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

Static sensors (in the world) in rviz?

asked 2023-08-09 10:45:35 -0600

dghw gravatar image

Hi,

I have a scenario in which I have a simulated world in Gazebo with static sensors attached to walls. I'd like to visualise both the sensors from a robot and the static sensors in rviz. However, the former isn't possible for some data types due to the lack of fixed_frames in rviz. So, for example, LaserScan messages can be viewed from the robot sensors (from base_link) but not from the world sensors (since, e.g., wall_1 isn't visible to rviz).

I know I can compute the transformation from the world origin to the sensors and broadcast a frame with tf2. However, this could be quite tedious for large worlds with many sensors defined using relative measurements (relative to a frame defined in the SDF).

What is the standard way to achieve this? Is there a programmatic way to broadcast the frames associated with sensors defined in Gazebo worlds to rviz?

Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-08-09 12:51:24 -0600

tfoote gravatar image

Yes, there are standard tools such as robot_state_publisher which will take a definition of a "robot" and publish tf frames.

It's designed to take in a URDF which you can generate from your SDF. With a tool like sdf2urdf And if everything is static you won't need to worry about joint_states

There's ongoing work to also reduce or remove the need for the SDF to URDF conversion too.

https://github.com/ros/sdformat_urdf

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2023-08-09 10:45:35 -0600

Seen: 228 times

Last updated: Aug 09 '23