0
$\begingroup$

We have a little robot in which we've built the actuators with two stepper motors for x and z axis and a dynamixel for the gripper. I know that the sensor_msgs/msg/jointstate message type would be right for the dynamixel. I don't know a good message type for the stepper motors. I was thinking of a custom interface, such as

# stepper_msg
string motorName  
int steps

Do you know a good default message type for them? What do you use?

$\endgroup$

1 Answer 1

1
$\begingroup$

Usually, you would not need a specific message type to interface with a stepper motor. If you think about it, the sensor_msgs/JointState is abstract enough that it would tackle any sort of actuator (joint). Unless it is absolutely necessary, try and avoid creating custom messages.

What you should do instead is, if you have an encoder/some sort of position sensor, you use the current position of the stepper motor (taken from your encoder readings), and push it back in the position vector of your JointState message. You integrate the position to get the velocity, and if you are not going to use torque-based control, you can choose to not be bothered about the effort vector.

This approach will also help you directly construct the JointState message from your URDF.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.