Closed Faheemibrahim closed 3 months ago
Can you share us your cpp file which you printing this output?
i have added the content in these files
launch and yaml files launch_file.txt waffle_pi_yaml.txt
.cpp files
for the output you have asked odomentry_cpp.txt joint_state_cpp.txt
i have added the rest just incase diff_drive_controller_cpp.txt dynamixel_sdk_wrapper_cpp.txt imu_cpp.txt node_main_cpp.txt sensor_state_cpp.txt turtlebot3_cpp.txt
Please let me know if you need anything else, and I really appreciate your help !!
I didn't understand what you're trying to do with this. But did you try to download turtlebot3_simulation from this address and launch it? Odom topic and your twist data most likely will come in simulation... After you complete this, we can go step by step...
Don't forget to put this repository to your workspace build with colcon build
I am working with a physical TurtleBot3 robot and have cloned the TurtleBot3 repository, specifically the release 2.1.5 https://github.com/ROBOTIS-GIT/turtlebot3/releases/tag/2.1.5 from GitHub, which is built for ROS 2 Humble. After cloning, I used colcon to build the workspace on the Raspberry Pi. To bring up the robot, I executed the following command on the Raspberry Pi ros2 launch turtlebot3_bringup robot.launch.py
Then, from my laptop, I used the teleop package to control the robot. While the robot was moving, I monitored the odometry data by running: ros2 topic echo /odom but i dont see it updating the velocity values. in simulation everything is working fine
Did you check the frames?
ros2 run tf2_tools view_frames
frames_2024-08-09_14.55.02.pdf yup heres an image
I didn't work on physical turtlebot3, do you still need to export to turtlebot3 model? Maybe you exported the wrong one?
No worries, I believe the turtlebot3 waffle_pi.Urdf is properly used when I launch the turtlebot_bringup. so I don’t think the issue is with it opening the wrong urdf. Could there be a problem with the urdf ? The picture below shows the waffle_pi.urdf being used
I see, what about coordinate information? Are they coming or not ( like velocity data ) with /odom topic? And what about other topics? For example is /cmd_vel coming true?
The topic updates the the Linear twist and angular twist but the covariance is not updating. Will that be an issue if I use slam or nav2 ? and yes the /cmd_vel updates perfectly
Is /odom topic successfully publish the points? If not, there is a problem with /odom topic's itself
i zoomed out and found this is this how it should be updating ? do you think its working fine ?
Can you run ros2 topic echo /odom --no-arr
in a new terminal next to your bringup and teleop nodes?
You can see the robot coordinates in the terminal...
Does it coming true or not?
The coordinates are being published correctly but for some reason it starts at x =26 and y = 14 and the z updates properly.
Can you reboot the robot? If it still starts at (26, 14) probably there are initialize values in a launch file. Can you check please?
Rebooting it didnt fix the values but physically turning it off and rebooting as you suggested worked. So is the odom fine ?
Yes it's looks like it
If odom coordinates and cmd_vel topics are coming true, linear and angular velocity in /odom should be fine also. Can't you use /cmd_vel in your code instead of using velocities in /odom for now until we figuring it out why the velocity data is coming wrong in /odom?
Thank you for looking into this issue and being patient with me. may god bless you bro !!
I thought odom data publishes everything. i just starting learning ros and was trying to make my own control system to experiment and I thought it was important for the odom to publish velocities and thought it wasn’t working.
So odom only publishes coordinates ? And I use cmd_vel to track the velocity ?
Exactly, best way to track velocity is subscribing velocity topic, in our case subscribing /cmd_vel
Honestly man you’re the best thank you !!
ISSUE TEMPLATE ver. 0.4.0
Which TurtleBot3 platform do you use?
Which ROS is working with TurtleBot3?
Which SBC(Single Board Computer) is working on TurtleBot3?
Which OS you installed on SBC?
Which OS you installed on Remote PC?
Specify the software and firmware version(Can be found from Bringup messages)
Specify the commands or instructions to reproduce the issue. ros2 launch turtlebot3_bringup robot.launch.py ros2 run turtlebot3_teleop teleop_keyboard ros2 topic list /joint_states ros2 topic echo /odom
Copy and Paste the error messages on terminal.