Adding constraints on the manipulator and the external axis #139
-
I'm trying to make the tool of the robot always point down and the external axis should rotate to compensate for this. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 14 replies
-
In this case since the default trajopt plan profile does not provide what you need I would create a new profile. I would inherit form the TrajOptDefaultPlanProfile and override the apply method for the cartesian waypoint. In this function I would do exactly what it is doing so it adds the dynamic cartesian constraint or cost. Then add an additional cartesian constraint using the world frame as the desired frame and then set the coefficients to [0,0,0,5,5,0] which will create a constraint that it must be oriented with world but allowed to rotate around the world z-axis. You could also take it a step further if you are using descartes and create a custom sampler which only generates sampled states which satisfy this to provided a better seed to trajopt. I would only do this if trajopt has issues finding a solution. |
Beta Was this translation helpful? Give feedback.
In this case since the default trajopt plan profile does not provide what you need I would create a new profile. I would inherit form the TrajOptDefaultPlanProfile and override the apply method for the cartesian waypoint. In this function I would do exactly what it is doing so it adds the dynamic cartesian constraint or cost. Then add an additional cartesian constraint using the world frame as the desired frame and then set the coefficients to [0,0,0,5,5,0] which will create a constraint that it must be oriented with world but allowed to rotate around the world z-axis. You could also take it a step further if you are using descartes and create a custom sampler which only generates sampled…