Ground truth of ignition gazebo model through ROS
Hi! I'm trying to get the ground truth pose of my vehicle from ignition to ROS. I'm using ROS2 Foxy and Ignition Citadel. I have found the values I want in the ignition topic /world/empty/pose/info
and created a IGN to ROS bridge that publishes TFMessages. The problem is the frame id and child frame id are not filled out so I cannot tell which tf is my model. Is there anyway for me to get the ground truth position of my model in ROS with the frame ids filled out?
Asked by bmchale on 2021-07-26 16:41:25 UTC
Answers
I believe the PosePublisher
system can be used to this effect. You can see an example of it in the SubT repo:
Instantiate the PosePublisher
plugin in the SDFormat file. This is an erb file, but the idea is the same: https://github.com/osrf/subt/blob/083c6a8acb0c25aa1a35e34517e628cd3b52ae77/submitted_models/x1_sensor_config_6/launch/spawner.rb#L29-L39
Map the ignition topic to ROS: https://github.com/osrf/subt/blob/083c6a8acb0c25aa1a35e34517e628cd3b52ae77/submitted_models/x1_sensor_config_6/launch/vehicle_topics.launch#L67-L79
Node to broadcast TF transforms based on the pose data: https://github.com/osrf/subt/blob/083c6a8acb0c25aa1a35e34517e628cd3b52ae77/subt_ros/src/pose_tf_broadcaster.cpp
Launch the tf_broadcast node: https://github.com/osrf/subt/blob/083c6a8acb0c25aa1a35e34517e628cd3b52ae77/submitted_models/x1_sensor_config_6/launch/vehicle_topics.launch#L113-L116
Asked by azeey on 2022-11-11 16:33:43 UTC
Comments
Did you solved this? if no, what does ign topic -l says?
Asked by kakcalu13 on 2022-02-21 12:36:31 UTC
I am also interested in this, did you find an answer?
Asked by rezenders on 2022-11-08 07:12:45 UTC