Skip to content

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

Open
@DevwratJoshi

Description

@DevwratJoshi

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions