Is there a way for MoveIt2 to only output the final goal position rather than the entire path? #3256
Replies: 1 comment 1 reply
-
Perhaps not the kind of solution you were looking for, but it sounds like your "CNC shield" is interpreting all motions as relative/incremental motions -- perhaps/probably due to using steppers. If you have encoders on those steppers, try switching the shield to absolute mode. Provided your board / gcode interpreter / motion controller supports blending as well, that should make a 1-to-1 conversion of If you have no encoders, or absolute mode is not supported, you could consider extending your |
Beta Was this translation helpful? Give feedback.
-
I'm working with a robot arm of my own design and I want to use Moveit2 for the IK calculations, however I'm driving the motors via a CNC shield so all that needs is the last set of coordinates from the path, not each step along the way as the GCode I am sending dictates
For example, if I want to rotate a joint connected to the "X" by 45 degrees, I need to send the GCode
G21 F250 X10
which moves the stepper 10mm clockwise and, because of the size of the gears, the joint rotates 45 degrees.What I need to avoid is sending a GCode step for each movement between
<current>
and the goal, because the GCode controller will then try and move X by 1, then by 2, then by 3 etc. which means by the time Moveit thinks that the goal has been reached, it's actually several orders of magnitude away from where it needs to be!Is there a way to tell Moveit2 to calculate the end state, and then only send that end state to the controller?
The CNC Shield isn't capable of calculating the IK, but it knows where it is and how far it needs to move in order to get to the specified location, so I'm hoping I can pair the both and get the result I need!
Here's the example output from the current code:
All I need the controller to receive is the last value
G21 F250 X156 Y0
Beta Was this translation helpful? Give feedback.
All reactions