Robotics StackExchange | Archived questions

Problem Visualising LaserScan in rviz?

Hi all,

Hoping someone can explain what what's missing here. I have 3 nodes: Openni2camera, depthminageto_laserscan and my own node which publishes all the tf transforms, sonar, odemetry, telemetry and ir data.

When I come to get rviz to publish the laserscan message i get this:

image description

rviz seems to be happy that the transform is correct

my topic graph looks like

image description

and lastly the bit of code that does the transform for the

bool ToeminatorROSBridge::publishLaserScanTF(ros::Time time, RobotData* pRobotData)
{
// Scan Range
sensor_msgs::Range sonar;
tf::TransformBroadcaster sonar_broadcaster;
ros::NodeHandle n;


sonar_broadcaster.sendTransform(tf::StampedTransform(tf::Transform(tf::createQuaternionFromRPY(0, 0, degree_to_radian(ROS_FrontSonarAngle)), 
                                                                    tf::Vector3(0.0, 0.15, 0.0)),
                                                                    time,
                                                                    "base_link", 
                                                                    "camera_depth_frame"));

return true;
}

Anyone any idea where the problem lies? - I suspect it's transform relate, not sure where however. All the other data (Sonars etc are showing up as expected)

image description

EDIT:

So running:

rosrun tf static_transform_publisher 1 0 0 0 0 0 /base_link /camera_depth_frame 10

yields this as a image description

Both nothing in rviz or run

rosrun tf view_frames

Many Thanks

Mark

Asked by MarkyMark2012 on 2014-09-04 14:45:36 UTC

Comments

that's very strange. Does it display normally if you publish a static transform instead of using your transform broadcaster?

Asked by ahendrix on 2014-09-07 21:23:03 UTC

Good idea - I've not tried a static transform yet - will try that this evening and report.

Asked by MarkyMark2012 on 2014-09-08 01:05:22 UTC

try changing fixed frame in global options to some other frame.

Asked by bvbdort on 2014-09-08 15:31:12 UTC

Answers