Rosanswers logo


I recently bought a 6 dof robot arm (7 servos), the servos have no feedback

I have built a somewhat accurate urdf (difficult since i measured it) and i plan to control the arm with rosserial commanding the servos.

Some questions:

What is the simplest approach?

Idea1: use ros control with JointTrajectory Controller and a hardware interface (i am not good in doing that), do i need to use async spinner in the hardware interface? do i also need position controllers for each joint?

Idea2: use ros control with gazebo and echo the joint states (since no feedback assume perfect execution)to my robot? This might be problematic since i want to mount the arm to a mobile base with a kinect that will not be in the gazebo simulation

Idea3: disregrad ros control (i dont realy need any features of ros control since simple servos) and implement an action server for followJointTrajectory that moveit requires and manually publish joint states for TF. I tried this approach but i couldn't get MoveSimple plugin (used to send the trajectories outside moveit simulation) to work, i could get the trajerctory points outside moveit and possibly send them to the robot but when i tried to send goals programmatically it said execution failed (havent p]ublish joint states though).

I am looking for a pain free approach to control a arduino robot arm this might be usefull to others, most implementation i saw used a gazebo simulation and send the jointstates to rosserial for execution but again what if you have a kinect outside of gazebo simulation?.

if you can provide ros control yaml files and launch files and the hardware interface executable would be ideal!

Originally posted by makemelive on ROS Answers with karma: 66 on 2019-11-03

Post score: 0


1 Answer 1


Rosanswers logo

Yes you are correct

I should have answered this question since i had solve it.

In my open mobile manipulator project,


i followed the make a node approach that subscribes to joint_states and transforms them to appropriate servo commands for execution in rosserial (multiarray msg), here is the node


here is the rosserial code



in order to integrate the arm with Moveit, Moveit requires an action server to execute the commands. This action server typically gets made with ros control with a follow_trajectory_controller, but it is possible to create this action server from scratch like they have done with the dynamixel arm.

In order to use ros control, a hardware interface needs to be made. In simulation this is easy with the ros_control plugin. But in the real robot we need to write this hardware interface and specifically the read() and write() functions. To that end i used as a template this helpful repository


and my version, which i deleted some testing stuff because i couldn't easily compile them is at


Now, since my arm DOESN'T have Feedback i made a hack, meaning that whatever position_command was coming from position_command_interface (write() )i pass it directly to the joint_State_interface (read() ).

This means that we assume perfect execution. This also has the Effect that the robot-rviz-joint_States thinks the arm is moving whether or not we have connected the real arm with rosserial or not, because in the read() and write() functions we don't touch the hardware as we should with an arm that has feedback.

After that we can make the arm to a clone of the joint_States with the above mentioned nodes and rosserial.

Lastly in order to avoid sudden movements of the arm, i have made another callback in the rosserial named activate_arm.

If we publish and int 1 to this callback it will activate the servos in a predifined desired starting position and if we publish 0 it will deactivate the servos.

So firstly we must first command the arm with Moveit to go to this desired location, without having the servos activated, when the robot-rviz-joint_States thinks the arm is in that location.

We can activate the servos to the starting location. Now the arm is "synchronized" and can clone the joint_States without sudden movements. In the same location we can also deactivate the servos and the arm will softly drop if we no longer want to use it and waste energy.

Hope this helps!!


Originally posted by makemelive with karma: 66 on 2020-04-17

This answer was ACCEPTED on the original site

Post score: 1

Original comments

Comment by makemelive on 2020-04-17:
@inaciose ^^

Comment by inaciose on 2020-04-29:
@makemelive Tankyou for share. Nice robot. :) I will take some time to check your repository.


Your Answer

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