Static sensors (in the world) in rviz?
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 fixedframes in rviz. So, for example, LaserScan messages can be viewed from the robot sensors (from baselink) 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
Asked by dghw on 2023-08-09 10:45:35 UTC
Answers
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
Asked by tfoote on 2023-08-09 12:51:24 UTC
Comments