Building a hardware interface for a 6DOF custom build robot
Hello all together,
I am currently building a hardware interface for a custom build 6DOF robot arm to control it with MoveIt and execute trajectories. So far I've had success implementing a hardware_interface::PositionJointInterface
and using a position_controllers/JointTrajectoryController
to control the robot. The robot publishes the current joint angles into /joint_states
and there is another topic on which the robot gets the positions (in radians) from the controller to follow the trajectory as calculated from MoveIt and visualized in rviz.
So far so good.. When trying to move the robot on a cartesian path the end-effector is not really moving straight. I assume that the controller I am using is not appropriate for this purpose since it does not (to the best of my knowledge) contain an inner feedback loop. Since I can also send velocities to the robots stepper motors, it would be better to use a controller which takes joint positions as an input and outputs velocities.
Anyone knows which controller could be suitable for my situation? I was thinking about using a velocity_controllers/JointTrajectoryController
or a pos_vel_controllers/JointTrajectoryController
but I am not sure how these controllers are controlling my actual robot.
I'd be very grateful if anyone could clarify that for me.
Asked by denrot on 2019-09-23 10:37:07 UTC
Answers
I am not sure which controller would be better for your application but here is some information that might help:
- To the best of my knowledge, the
position_controllers/JointTrajectoryController
is an open-loop controller so it will simply forward the commands (without doing any corrections). velocity_controllers/JointTrajectoryController
will give you velocity as an output which you can forward to your motors. You can tune the PID gains to get the required performance. You can also usepos_vel_controllers
orpos_vel_acc_controllers/JointTrajectoryController
withpos_vel
orpos_vel_acc
interface respectively.- In general,
JointTrajectoryController
can work with different trajectory representations so, based on what information you provide out of pos, vel an acc in your waypoints, the degree of spline interpolation will be chosen. (http://wiki.ros.org/joint_trajectory_controller#Trajectory_representation)
Just a side note, you can also check the state
topic published by the JointTrajectoryController
and maybe use it to visualise the error with rqt_plot
. (http://wiki.ros.org/joint_trajectory_controller#Published_Topics)
Asked by Pratik Somaiya on 2021-08-08 22:15:19 UTC
Comments