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

Assigned max velocity attained in global x direction but not in global y direction #1164

Open
DevwratJoshi opened this issue Aug 20, 2021 · 1 comment

Comments

@DevwratJoshi
Copy link

Setup:

distro: ros melodic
robot type: non holonomic differential drive
simulator: stage

Expected behaviour:

  • When the assigned goal position is sufficiently far away, the robot should attain a velocity equal to or close to the assigned max_x_velocity.
  • The above should be true regardless of the direction the robot is moving in

Actual behaviour

When the robot moves along the y direction of the odom frame, the attained velocity is much smaller than assigned max velocity.
This issue is not seen when the robot is moving in the x direction of the odom frame;

the robot moves at equal to or close to the max velocity when moving along the x direction of the odom frame but not when moving along the y direction.

Speculation:

I think this has something to do with the max velocity being capped based on the current robot velocity as received from odom and the max acceleration, as seen in this line of trajectory_planner.cpp in the createTrajectories function.

It seems that the above function expects the current velocity in the robot's frame to calculate velocity limits with, but is provided with velocities inthe global frame as seen in this section.
This is a problem because the velocity of the robot in the x direction of the global frame (odom) is of course 0 when moving in the y direction of the global frame. The max velocity is then capped at the max attainable velocity within the acceleration limit and simulation period when starting with a 0 velocity.

Am I missing something obvious?
Please let me know if I am missing something obvious.

@DevwratJoshi DevwratJoshi changed the title Different max velocities in x and y directions Assigned max velocity attained in global x direction but not in global y direction Aug 20, 2021
@lucamozza
Copy link

Hi! I found a similar issue.
What frame does your odometry source publish its velocities in? That is, what is the value of child_frame_id in your odometry message?
Move base assumes it is in base_link frame and disregards whatever that field is set to (see here).

This is definetly a bug for me, it does not respect ROS conventions for cooridinate frame handling

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

No branches or pull requests

3 participants