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

how to display rviz markers at a fixed location

asked 2013-03-29 08:13:43 -0500

Hi,

I need to display markers (currently few arrows, showing path for robot) at a fixed point wrt my simulated environment. The environment has turtlebot and few objects.

While publishing markers if I set marker.header.frame_id = "/odom", then I get the desired result as long as robot does not collide or I don't reset the environment.

Before publishing the markers if I call service /gazebo/get_model_state and get the robot state, and use that to apply inverse transformation to the markers, and use /base_link in marker.header.frame_id, then I get what I need.

But I am sure there must be a simpler way to do this. What should be my frame in marker.header.frame_id

or

how can I use TF to do this easily. As of now I am using only 2D inverse transformation, so when robot collides then for some time the markers are displayed at different location.

I am using electric on Ubuntu 11.10

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-03-29 17:43:51 -0500

dgossow gravatar image

If you assign a timestamp to the marker, or if the fixed frame in RViz is set to the same frame that the marker is transmitted in, it will always stay at a fixed location in RViz.

edit flag offensive delete link more

Comments

Yes, of course, but if I choose an arbitrary (diff) name for marker frame than robot and other things (point cloud etc) are not displayed. How can I make all of them + fixed markers display simultaneously. There should be some global frame or sth else (I mean simulations should have this advantage)

aknirala gravatar image aknirala  ( 2013-03-29 18:23:34 -0500 )edit

So, you want Gazebo to send a transform between base_link and the world frame?

dgossow gravatar image dgossow  ( 2013-04-01 06:46:43 -0500 )edit
dgossow gravatar image dgossow  ( 2013-04-01 06:47:11 -0500 )edit

Reg link at pastebin.com/hcipigtf I couldn't understand the code (nt gd wd python). Could you plz explain how It's reading (one) object position from Gazebo and publishing transformation between world frame, robot base_link and object link. I guess for this I don't need to load URDF to param server.

aknirala gravatar image aknirala  ( 2013-04-15 13:56:24 -0500 )edit

Question Tools

Stats

Asked: 2013-03-29 08:13:43 -0500

Seen: 2,028 times

Last updated: Mar 29 '13