Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LIMIT_X_MAX_VELOCITY is scaled for XM430 W210-T (Waffle) and not W250-T (Burger) #323

Open
Raphtor opened this issue Dec 13, 2022 · 1 comment

Comments

@Raphtor
Copy link

Raphtor commented Dec 13, 2022

(See ROBOTIS-GIT/turtlebot3#765 (comment))

The ignorance of the linear velocity of 0.22 seems to be caused by the out of range data error from XL430 DYNAMIXEL.
The max linear velocity of XL430 is set to 265.

The constraining logic in the turtlebot3.cpp file, cannot filter the data that exceeds the maximum value in the turtlebot3_motro_driver.cpp file.

The LIMIT_X_MAX_VELOCITY is set to 337 for some reason (looks like it is an old max velocity value of the XM430 in TurtleBot3 Waffle Pi), and this does not help filtering the goal_velocity passed from turtlebot3.cpp.

This can be identified as below.

When publishing the linear velocity 0.22,
goal_velocity_from_cmd[VelocityType::LINEAR] is constrained by the max_linear_velocity = 0.033 * 2 * pi * 61 / 60 = 0.2108...
wheel_velocity[LEFT] does not exceed the LIMIT_X_MAX_VELOCITY(which is 337) and therefore, 0.2108... * VELOCITY_CONSTANT_VALUE(1263.632935) = 266.3749...
casting 266.3749... to int32_t will return 266 which is out of range for XL430 Max Velocity (265)
Meanwhile, publishing 0.21,
goal_velocity_from_cmd[VelocityType::LINEAR] = 0.21
wheel_velocity[LEFT] does not exceed the LIMIT_X_MAX_VELOCITY(which is 337) and therefore, 0.21 * VELOCITY_CONSTANT_VALUE(1263.632935) = 265.3629...
casting 265.3629... to int32_t will return 265 which is acceptable for XL430 Max Velocity (265).
Recently we have also found some issues in TurtleBot3 ROS2 OpenCR firmware, and this will be fixed along with it.

PR here: #322

@BartoszZiembickiSpyrosoft

Hi, how did you update OpenCR with your own code? I have to do similar change, but for waffle_pi. My turtlebot motor speed limit is 330, not 337 as set in the code. I'm looking into the repository for clues how to build it, but I'm a bit lost. I also found this https://emanual.robotis.com/docs/en/platform/turtlebot3/opencr_setup/#opencr-setup, but I'm lost too. It seems this instruction doesn't use turtlebot3_ros2, but turtlebot3 instead. I would like to be sure I'm building and uploading the right stuff :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants