ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

See point cloud in rviz

asked 2014-03-19 10:28:03 -0500

davidgitz gravatar image

Hi, I'm trying to view a point cloud that I am generating with an AR Drone in rviz. I have the transform set as /ardrone_base_link --> /cam_front and using tf_echo I see:

rosrun tf tf_echo /ardrone_base_link /cam_front
At time 1395260250.630
- Translation: [0.007, 0.209, -0.001]
- Rotation: in Quaternion [-0.677, 0.034, -0.037, 0.735]
            in RPY [-1.489, -0.000, -0.101]
At time 1395260251.568
- Translation: [0.006, 0.209, -0.001]
- Rotation: in Quaternion [-0.677, 0.034, -0.037, 0.735]
            in RPY [-1.489, -0.000, -0.101]

If i do an echo on the /tf I get:

rostopic echo /tf
    transforms: 
  - 
    header: 
      seq: 0
      stamp: 
        secs: 1395260346
        nsecs: 276967023
      frame_id: /ardrone_base_link
    child_frame_id: /cam_front
    transform: 
      translation: 
        x: 0.0063893099241
        y: 0.209490348767
        z: -0.000927047945466
      rotation: 
        x: -0.676587213276
        y: 0.0340744443113
        z: -0.0371685138251
        w: 0.734634042674

And the tf_monitor:

    rosrun tf tf_monitor /ardrone_base_link /cam_front 
RESULTS: for /ardrone_base_link to /cam_front Chain is: /ardrone_base_link -> NO_PARENT -> /ardrone_base_link -> /ardrone_base_link Net delay     avg =
    0.069172: max = 0.21447

And I am publishing the point_cloud on /ardrone/point_cloud:

rostopic type /ardrone/point_cloud
sensor_msgs/PointCloud2

If I do a rostopic echo on the point_cloud I get proper data.

When I try to use rviz on the point_cloud with the above tranform I get the following errors whenever a new point_cloud message is published:

Message from [/drone_stateestimation] has a non-fully-qualified frame_id [1]. Resolved locally to [/1].  This is will likely not work in multi-robot systems.  This message will only print once

And the point_cloud never shows up. I also get message in rviz saying "Showing [0] points from [0] messages."

In my tf broadcase I am doing:

tf::StampedTransform t = tf::StampedTransform(tr,ros::Time::now(),"/ardrone_base_link","/cam_front");

I think part of the problem is the seq:0 in the rostopic echo /tf never changes, but I don't know how to fix that. There could be other problems too. Any ideas?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2014-03-19 21:28:05 -0500

Your pointcloud appears to have the frame_id "1", which is no frame_id that is available in your tf tree. You probably want it to have the frame_id "/cam_front".

You can also test if your pointcloud gets published properly by setting the fixed frame in rviz to "1" (just type it into the box).

edit flag offensive delete link more
0

answered 2014-04-10 23:53:03 -0500

I seem to remember that tf has a problem with purely numeric frame names (such as "1"). Try renaming it to "frame1" or such everywhere.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2014-03-19 10:28:03 -0500

Seen: 1,673 times

Last updated: Apr 10 '14