roscanopen + joint_trajectory_controller + Interpolated Position Mode
I would like clarification regarding the control flow that occurs when a joint_trajectory_controller is used with ros-canopen to control motor controllers in Interpolated Position Mode (CanOpen drive mode).
Let's describe the situation. I am actually using three canopen DS402 servomotors to control a Parallel Delta Robot. I am using ROS and will interface ROS with the servo motors using ros-canopen.
the "required_drive_mode" field in the canopen_motor_node configuration is set to 7, to indicate to the joint_trajectory_controller that the canopen controllers are in interpolated position mode.
My understanding is that ros-canopen's control loop is specified by the SYNC interval, which i specify in the canopen_chain_node using the interval_ms parameter.
I would like to define a trajectory for my delta robot, which consists of three axes in interpolated position mode. The canopen controllers only support linear interpolation between setpoints, so the interpolation data records each consist of 1 target position. My confusion arises when thinking about the writing of the setpoints to the interpolation data buffer of the canopen controllers.
When i send the joint_trajectory_controller a trajectory with positions and timestamps (no velocity or acceleration for now), the trajectory controller will write the first position data to the canopen controllers at the specified time in the trajectory message, at the next SYNC interval (as controlled by ros-canopen). The controllers will receive this setpoint, and interpolate between current positon and the setposition and begin motion. In order to have smooth motion between setpoints, i have to load another interpolation data record into the interpolation data buffer before the execution of the current setpoint is complete. The problem, is that the joint_trajectory controller will not write another value to the hardware interface until the setpoint is complete. Would this not create a situation where the axles stop everytime a setpoint is reached and wait a small amount of time to receive another record. How can i get the joint_trajectory_controller to write a bunch of setpoints to the canopen controllers to ensure smooth transition from one linear interpolation to another...