I’m trying to create my own program with the robot arm in the manipulation course, but only the first waypoint is being executed. I’ve attached code. Essentially, when I input multiple position waypoints to be executed at once (x += 2.0 and y+=2.0 for example) it properly moves diagonally, but when I want to move x+=2.0 and then push_back() and then move y+=2.0 and then push_back(), only the first is executed. Does anyone know why this might be? I can’t find the discrepancy between my own program and the exercises I did in the course, which run correctly using multiple waypoints.
When the whole cartesian path is not executed is because the planner has not been able to compute the complete path. This can be measured with the fraction variable, which indicates the percentage of the Cartesian path that the planner was able to compute successfully. For checking this, you could add the following check to your code:
In the example code you provided you are using waypoints of ± 2.0. This means 2 meters, which is way too big. Try testing with more reasonable values and check that the planner is able to compute 100% of the path. Besides checking the fraction value, you can also see this in the move group output:
Additionally, I’d recommend you add joint limits to your move group configuration, to avoid the planner providing weird path trajectories, which usually end up in more complex joint configurations (which is going to make the planning harder). For this, you can add the following to your joint_limits.yaml file:
this was very useful information! Thank you very much. With the information you provided me, the robot simply computes the joint positions, and then doesn’t compute any waypoints. With the new error code you suggested I add, I am seeing that the Cartesian Path failed to compute with 0% of the requested trajectory. Do you have any idea why this might be? I have attached the updated package.