Hi everyone!
I'm having troubles creating my own TF2 broadcaster to publish a tf from odom to base_link. I'm using a .sdf file in gazebo ignition fortress and not an urdf so i cant use robot_state_publisher, and i think i have to create a custom broadcaster to solve the lack of tf in the odom to base_link frames. I tried following the tutorial at (https://docs.ros.org/en/rolling/Tutorials/Tf2/Writing-A-Tf2-Broadcaster-Py.html) but had no success.
I'm using ROS 2 Foxy with ubuntu focal 20.04 and gazebo ignition fortress.
My ign topic list is as follow:
/clock /gazebo/resource_paths /gui/camera/pose /model/prius_hybrid/cmd_vel /model/prius_hybrid/imu /model/prius_hybrid/laserscan /model/prius_hybrid/laserscan/points /model/prius_hybrid/odometry /stats /world/empty/clock /world/empty/dynamic_pose/info /world/empty/model/prius_hybrid/joint_state /world/empty/pose/info /world/empty/scene/deletion /world/empty/scene/info /world/empty/state /world/empty/stats
If i echo the /world/empty/pose/info i got at the prius_hybrid pose the following:
pose { name: "prius_hybrid" id: 8 position { x: 5.43665402911271 y: 2.1081258650307535 z: 0.012649947145117342 } orientation { x: 2.6633471804933985e-09 y: -1.5456830808628278e-08 z: 0.97151594503524608 w: -0.23697419383188628 } }
I'm using ign_bridge to port topics to ros2, echoing the odometry, imu and laser i verified it's all working as it should, like i can view lidar data on rviz2. But if i try to use slam_toolbox for example or robot_localization it misses the odom to base_link tf.
If anyone has any suggestion all help will be appreciated, thanks!
Originally posted by marcelomm103 on ROS Answers with karma: 13 on 2022-05-19
Post score: 0