Hi, this is Jiaxun. I’m a master student in Mechanical Engineering and Material Science department at Duke University.

This is my personal page and my project is using Moveit in ROS to control a 6 axis robot arm (armbot) .This project it is one of the subproject of SHSbot

If you have further question about this project, feel free to contact me : jiaxun986@gmail.com

Robot Control Based on ROS and Arduino:

Step1 - Control

Step2 - Path Planning

We have talked about how to control the motion of armbot from the Step1.  But it can only control the robot arm move to programmed position. It will be much better if the robot arm can execute some trajectory automatically instead of setting position by ourselves. Therefore, next step we are going to learn how to use ROS to do the path planning and let the armbot follow this path. You may feel lost like I was when thinking about how to use ROS do the path planning, how can we know the position of each joint and how to send the joint position to Arduino and let it execute. But don’t worry it just need some time to learn step by step. Let figure out how to use ROS to get planned path first. 

To do path planning on Moveit, we need to know what is URDF file and robot configuration file. URDF file is an xml file format used in ROS to describe all elements of a robot. We need the robot URDF file to build robot configuration file by using Moveit setup assistant. The robot configuration file contains all necessary files for moveit and path planning in Rviz. After that, we can do path planning in Rviz. Luckily, these knowledges and tutorial are well explained in capstone previous project in this pageThe armbot URDF file is here.

Kinematics is used to set up the relationship between robot arm joint coordinates and its spatial layout. There are forward kinematics and inverse kinematics. So, the forward kinematics is to calculate the end effector position from each angle of the joints and inverse kinematics is to calculate the angle of each joint from the position of robot end effector. In the Moveit setup assistant, we used kdl_kinematics_plugin to solve inverse kinematic.  In this project, the initial robot arm pose is set in the way shown as follow:

                                

Figure 10. initial robot poses

Step3 - Communication

Conclusion

In conclusion, the aim of this project is to use ROS to do the path planning, then send joint state to arduino through ros serial and finally let arduino to do the base control of motor, but I haven’t achieved this goal successfully. As shown in picture below, I have done the path planning and able to subscribe the Joint_states topic by the Arduino node. Also, the base control part in arduino is finished. However, for some reason, the arduino can’t execute the message in the joint_states topic which it has subscribed. One reason for this is that the joint_state is the sensor massage in the Rviz simulation environment, which is using a fake controller. So, maybe we need to learn to use the hardware interface in ros, although the joint_states message already contains the position information we need.  

                                  

Learning Levels:

Future Work:

  • Try to fix the joint state subscribing problem.
  • Add senser to give feedback of joint in real robot arm. 
  • Use limit switch to set initial position. 

Reference:

Akshay Kumar(2020).How to use Arduino with Robot Operating System.https://maker.pro/arduino/tutorial/how-to-use-arduino-with-robot-operating-system-ros

ROS nodes, topics, and messages.https://subscription.packtpub.com/book/hardware_and_creative/9781788479592/1/ch01lvl1sec13/ros-nodes-topics-and-messages

( If you have the bug like this:

no such file or directory #include cstring

You can go here and download the cstring and cstddef file, and then move the file to the ros_lib file, which is under your Arduino libraries file. )

Getting Started—moveit_tutorial.http://docs.ros.org/en/melodic/api/moveit_tutorials/html/doc/getting_started/getting_started.html

Choose your vision carefully. This is for ROS melodic, but you can also find the resource for other version in this website.

Tic T500 USB Multi-interface Stepper Motor Controller.https://www.pololu.com/product/3135