Problem Visualising LaserScan in rviz?

asked 2014-09-04 14:45:36 -0600

MarkyMark2012 gravatar image

updated 2014-09-08 14:38:04 -0600

Hi all,

Hoping someone can explain what what's missing here. I have 3 nodes: Openni2_camera, depthminage_to_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)),

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


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


edit retag flag offensive close merge delete


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

ahendrix gravatar image ahendrix  ( 2014-09-07 21:23:03 -0600 )edit

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

MarkyMark2012 gravatar image MarkyMark2012  ( 2014-09-08 01:05:22 -0600 )edit

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

bvbdort gravatar image bvbdort  ( 2014-09-08 15:31:12 -0600 )edit