Author: Wolf Chen
We build this document to control our custom manipulator which we designed in a class 'Mechanical Practice'.
We connect servo motors to Arduino, connet Arduino to ROS with rosserial, use Moveit! assistant to build our robot Moveit! model, and publish the position information in /move_group/fake_controller_joint_states to rosserial.
Guidance:
step 1 (Preparation):
DO NOT connect the motors in this step
open file catkin_ws/src/arm_moveit/arm_arduino/arm_moveit_arduino_auto/arm_moveit_arduino_auto.ino and upload it to arduino.
(in terminal)
$ roslaunch arm3_moveit_config demo.launch
p.s. arm_moveit_config, arm2_moveit_config are executable folders, but we use arm3_moveit_config as our final manipulator version.
step 2 (Setup):
DO NOT connect the motors in this step
(in terminal)
$ rosrun arm_moveit moveit_convert this code will enable topic "joint_angles"
$ rosrun rosserial_python serial_node.py /dev/tty[port] [port] refers the port of your arduino connection
(optional, for debugging process)
$ rostopic echo /joint_angles
$ rostopic echo /joint_angles_feedback this topic is generated by arm_moveit_arduino.ino
step 3:
DO NOT connect the motors TILL the end of this step
(in rviz)
Press Planning in MotionPlanning, set the manipulator to a random position and press Plan and Execute.
When the execution is over, set Select Goal State in Query to home, and press update.
Press Plan and Execute
Make sure everything works fine.
Connect the motors HERE
step 4:
START PLANNING
NOTICE:
If the motors powered by external power source, remove the power source first, then break the connection of the arduino.