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

How to offset costmap in rviz?

asked 2016-05-04 08:45:51 -0500

TRyKKs gravatar image

Hi there!

I'm running the examples found here: http://wiki.ros.org/rtabmap_ros/Tutor...

Now, I don't have a turtlebot, so my kinect is placed a lot higher up. This makes the map visualize pretty weird in rviz (it's floating in mid air).

How do I offset it to say 1m below it's current position on the z-axis?

Do I make a new frame with /base_link or similar as parent and edit a few launch files, if yes, what launch files? If no, how to move the map?

(Map position is uneditable in rviz)

Let me know if anything was unclear, thank you!

edit retag flag offensive close merge delete

Comments

Hi! I have the same issue. Have you managed to solve it? I only have one static transform between base_link and camera_link. When I add another between base_link and ground I get and error that my tree is not connected.

Dox gravatar image Dox  ( 2018-07-20 06:21:14 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-05-04 13:58:33 -0500

matlabbe gravatar image

Without modifying the robot state published by turtlebot launch file, you could add a static transform between the ground and base_footprint:

<node pkg="tf" type="static_transform_publisher" name="gound_to_base_tf" 
    args="0.0 0.0 1.0 0.0 0.0 0.0 /ground /base_footprint 100" />

You add this to demo_turtlebot_mapping.launch and change base_footprint by ground for rtabmap, rgbd_odometry and rtabmapviz nodes in the same launch file.

This way, the robot would be 1 meter over the ground, so lowering the map from 1 meter.

cheers

edit flag offensive delete link more

Comments

I tried to follow your suggestion but with no success. This is how my transform tree looks with modifications. BTW, Odom is published by Rosaria and it connects to base_link.

Dox gravatar image Dox  ( 2018-07-20 11:25:02 -0500 )edit

In your case, you cannot do the hack above on your robot, as odometry is already computed accordingly to base_link. You may try to make rossaria publishing odom to a base_footprint frame that would be on ground under base_link, then use base_footprint for rtabmap node.

matlabbe gravatar image matlabbe  ( 2018-07-23 16:45:15 -0500 )edit

I did try that afterwards, but it seems like rosaria can only publish to base_link frame. I set base_link_frame parameter as base_footprint but I still get the same warning of two unconnected trees. There is no connection between odom --> base_footprint.

Dox gravatar image Dox  ( 2018-07-25 06:36:44 -0500 )edit

well, in your tf tree, rossaria doesn't seem to publish any odometry

matlabbe gravatar image matlabbe  ( 2018-07-25 16:50:43 -0500 )edit

Question Tools

Stats

Asked: 2016-05-04 08:45:51 -0500

Seen: 662 times

Last updated: May 04 '16