Ask Your Question
0

Kinect Simulation in Gazebo/Rviz

asked 2020-09-26 00:29:30 -0500

Miracle gravatar image

Hi Everyone,

I am trying to simulate a kinect in gazebo to visualize the point cloud data. I was trying this tutorial ros depth camera integration - gazebo

I added the code (plugin) in model.sdf as stated in the tutorials. I was able to visualize the image topic (/color/image_raw) in Rviz. But the camera frame (<framename>camera_link</framename>) is not shown in fixed frame in Rviz to visualize the point clouds.

Do I need to add tf? The tutorial doesn't added any tf but was able to visualize the point cloud.

Please let me know how can I change the fixed frame to camera frame.

Thanks

edit retag flag offensive close merge delete

Comments

Hello.. I am also facing this same issue. Did you find a solution for this?

manuelmelvin gravatar image manuelmelvin  ( 2021-02-22 15:25:09 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-09-29 04:32:32 -0500

Weasfas gravatar image

Hi @Miracle,

In the tutorial you posted they used a fixed frame (namely the camera link name) that is used to produce the plugin messages. Included with the plugin param <frameName>camera_link</frameName>: this is telling the plugin to produce the camera msgs with the header frame as camera_link. If you do not have a proper tf_tree you will be only able to see its msgs in rviz with the fixed frame set up as camera_link (This option is in the right panel->Displays->Global Options->Fixed Frame).

However in general what do you want here is a full working tf_tree able to relatee very important link in space for your robot. So you can have a global frame, for instance map or odom wich are conected to the base_link and from the base_link to other important joints or your robot. This is for Rviz to be able to apply the proper transformation for every topic and properly visualize all from the global frame. So theoretically, you can use only the fixed_frame of the camera but that in the future is not a good practice to carry out.

For generating a tf_tree for your robot you can use the robot_state_publisher node. And if you want more information about ROS frames you can check its standard.

Hope this helped you.

Regards.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-09-26 00:29:30 -0500

Seen: 191 times

Last updated: Sep 29 '20