JRL-CARI-CNR-UNIBS / OpenMORE

The repository contains a ROS-based implementation of a library of sampling-based robot path replanning algorithms. It also develops a framework to manage trajectory execution with continuous path replanning and collision checking of the current path.
Apache License 2.0
21 stars 3 forks source link

Setting spline order and kinematic constraints #9

Closed ncovic1 closed 1 week ago

ncovic1 commented 1 week ago

Hi dr. Tonola,

I am writing you again to ask two more simple questions. First one is related to setting a spline order for a trajectory time parameterization/interpolation. I tried to set it here, and 3rd and 4th spline orders are OK, but 5th spline order does not seem to work properly (I think so), because the robot always instantly reaches the goal (even I have tried many different goal configurations and reducing scaling factor).

The second question is about kinematic constraints. As much as I could see, your approach (MARS) satisfies maximal velocity constraint for each robot's joint, yet does not satisfy maximal acceleration and jerk constraints. Can your approach incorporate all kinematic constraints or only maximal velocity constraint for a trajectory interpolation? I have tried setting has_acceleration_limits to true for each robot's joint, but it does not take any effect.

Thanks in advance for your kindness help. Nermin

CesareTonola commented 1 week ago

Hi,

1) The spline order can be set as follows: 0 for continuous positions, 1 for continuous velocities, 2 for continuous accelerations, 3 for continuous jerks, or 4 for continuous snaps. We are using this library for spline interpolation. Thanks for pointing out the issue; I’ll work on clarifying it further.

2) MARS does not handle time parameterization directly. It generates a path, after which the replanner manager computes the time parameterization, as seen in this line. This process is consistent across all replanners in the library. We rely on existing MoveIt libraries for time parameterization, which, as far as I know, take acceleration constraints into account when specified. However, splines between waypoints are calculated without explicitly considering these constraints. They are computed once defined the spline order and the position, velocity, acceleration, etc., at the waypoints as determined by the time parameterization. Although I haven’t encountered this issue personally, maybe it is possible for the spline to exceed the constraints if the initial and final waypoints are already near the limits. I have not investigated this yet.

I hope this can help you.

ncovic1 commented 1 week ago

Yes, your answer is useful. Thank you very much!