Open mrunaljsarvaiya opened 2 years ago
I have the same issue using MoveIt! and the joint_trajectory_controller sampler (the QuinticSplineSegment). It seems the issue is more evident with MoveIt! trajectories trying to synchronize multiple joints. Note: the used Time parametrization in MoveIt! is the IterativeSplineParametrization.
I have attached the MoveIt! trajectory as a CSV, the resampled trajectory as a CSV, and a sample of C++ code I did to thinker with the sampler.
The following figure shows the MoveIt! pos, vel and acceleration trajectory for two joints (the smooth curves) and the resample trajectory.
The original trajectory: moveit_traj.csv
The resampled trajectory: moveit_sampled.csv
The code to resample it (build and run a.out movei_traj.csv
): resample_code.zip
EDIT: I found the issue, it came from a custom time parametrization which modified incorrectly the original time parametrization.
We have a forked version of the joint_trajectory_controller that's modified to use the accelerations in the incoming joint trajectory. The desired trajectory looks fine (visualized via /state topic exposed by the controller) when the input trajectory is generated using moveit's trajectory generator. However, when we use another off the shelf trajectory generator, I see oscillations in the desired accelerations sampled by the trajectory controller. Below are pictures of the input to the trajectory controller and the desired accelerations picked up by the trajectory controller. Any idea what might be causing these oscillations? I've been looking through the code that samples the trajectory through quintic splines but I haven't caught anything yet.
Input Acceleration![input_acc_profile](https://user-images.githubusercontent.com/28722047/138751434-05b63cb2-9398-4ecb-a98a-e68bcb19cbb0.png)
Desired accelerations sampled by the trajectory controller![joint_trajectory_desired_acc](https://user-images.githubusercontent.com/28722047/138751473-6e5e599d-2679-41b5-8601-165a05788694.png)