turtlebot3
turtlebot3 copied to clipboard
May I know how we can obtain transforms of the bot? I want to obtain frame ids, similar to using hector_trajectory_server used in ROS
May I know how we can obtain transforms of the bot? I want to obtain frame ids, similar to using hector_trajectory_server used in ROS
Originally posted by @akshay-30 in https://github.com/ROBOTIS-GIT/turtlebot3/issues/512#issuecomment-890928829
@akshay-30
You can read a specific frame_id in /tf
topic.
Some of the the transform of the hardware attached to the robot are published via the /tf_static
topic.
I tried to read the odom frame and the base_link frame. And publish the frame ids , but I'm getting a error of invalid frame is passed in canTransform : odom frame (target frame) does not exist.
I'm using ubuntu 20.04 version on my laptop, and running ros2 foxy. I have tried to port hector_trajectory_server to ros2. Just want to test it on turtlebot3.
While TurtleBot3 is running the Bringup node, you can read the /tf
and will return both odom
and base_link
as below.
I'm trying to read the frame ids through tf2_ros::TransformListener, passing it into tf2_ros::Buffer. But canTransform and lookupTransform functions are not able to find the target frame ids. I get the error - frame does not exist
Nevermind, I found the bug in my code and was able to debug it with some help. I wasn't passing the right parameters into lookuptransform. Now I am getting the right frame ids and their transforms. Thanks for the help @ROBOTIS-Will
@akshay-30 Looks like you haven't correctly installed the package or didn't source the correct working space. Make sure to install all the necessary packages to run the TurtleBot3.
For installation I followed the tutorial itself. And have sourced it properly. turtlebot3_gazebo, turtlebot3_navigation, turtlebot3_teleop are all building properly except turtlebot3_bringup