Description
I tried to use TOTG + ruckig smoother in a cpp project, where I want them to generate a smooth trajectory for a given path (generated without moveit). But it only changes one point, the other waypoints remain the same.
Maybe I understand something wrong with the API, do I have to iterate over every waypoint manually?
Your environment
- ROS Distro: Rolling
- OS Version: Ubuntu 22.04
- Source, main branch
Steps to reproduce
- Create and populate a robot model and robot state class
- Create a robot_trajectory from the robot state and add waypoints (position only)
- Run TOTG on the trajectory with
TimeOptimalTrajectoryGeneration::computeTimeStamps
- Resulting trajectory is feasible with given joint limits (velocity + acceleration)
- Run ruckig smoother on the same trajectory-variable with
RuckigSmoothing::applySmoothing
- Analyze the waypoints from the trajectory
For demonstration, I created a new test without TOTG in a fork of this repo, which describes my problem quite well.
Expected behaviour
A new trajectory parameterization considering also the jerk limits, i.e., a "streched" version of the result of the input trajectory.
Actual behaviour
Only the last point is changed, all other points remain the same.
The output from the test I linked above:
11: Original trajectory:
11: t: 0.1, p: 0
11: t: 0.2, p: -0.05
11: t: 0.3, p: 0
11: t: 0.4, p: -0.05
11: t: 0.5, p: 0
11: t: 0.6, p: -0.05
11: t: 0.7, p: 0
11: t: 0.8, p: -0.05
11: t: 0.9, p: 0
11: t: 1, p: -0.05
11: t: 1.1, p: 0
11: After ruckig smoothing:
11: t: 0.1, p: 0
11: t: 0.2, p: -0.05
11: t: 0.3, p: 0
11: t: 0.4, p: -0.05
11: t: 0.5, p: 0
11: t: 0.6, p: -0.05
11: t: 0.7, p: 0
11: t: 0.8, p: -0.05
11: t: 0.9, p: 0
11: t: 1, p: -0.05
11: t: 1.15177, p: 0
Setting mitigate_overshoot does not change this (only the time of the last point).
Same for giving explicit vel_limits, accel_limits, jerk_limits (considering the warning of the first test)
11: [ RUN ] RuckigTests.basic_trajectory
11: [INFO] [1701113459.795717082] [moveit_robot_model.robot_model]: Loading robot model 'panda'...
11: [WARN] [1701113459.806200614] [moveit_trajectory_processing.ruckig_traj_smoothing]: Joint acceleration limits are not defined. Using the default 10 rad/s^2. You can define acceleration limits in the URDF or joint_limits.yaml.
11: [WARN] [1701113459.806210176] [moveit_trajectory_processing.ruckig_traj_smoothing]: Joint jerk limits are not defined. Using the default 1000 rad/s^3. You can define jerk limits in joint_limits.yaml.
Description
I tried to use TOTG + ruckig smoother in a cpp project, where I want them to generate a smooth trajectory for a given path (generated without moveit). But it only changes one point, the other waypoints remain the same.
Maybe I understand something wrong with the API, do I have to iterate over every waypoint manually?
Your environment
Steps to reproduce
TimeOptimalTrajectoryGeneration::computeTimeStampsRuckigSmoothing::applySmoothingFor demonstration, I created a new test without TOTG in a fork of this repo, which describes my problem quite well.
Expected behaviour
A new trajectory parameterization considering also the jerk limits, i.e., a "streched" version of the result of the input trajectory.
Actual behaviour
Only the last point is changed, all other points remain the same.
The output from the test I linked above:
Setting
mitigate_overshootdoes not change this (only the time of the last point).Same for giving explicit vel_limits, accel_limits, jerk_limits (considering the warning of the first test)