simple 4DOF robot arm operated by ROS. Implements rosserial_python on the server, and rosserial_arduino on the Photon.
I bought this robot from Banggood (but without the controller):
The original model has a closed loop; i simplified this to remove the closed loop and plan to manage the offset joint angles through code.
- create custom message type e.g.
# Servoangle.msg
uint16 servo_id
uint16 target_angle
- report current servo angles via joint state publisher
- started
- currently publishing servo angles
- need to convert these to joint angles
- report when requested angle is outside min/max range for servo
- refactor code to move to separate h files
- document wiring etc.
- clone ros folder to catkin_ws and run
catkin_make
. Tested on Lubuntu 18.04 LTS with Ros Melodic Morenia. Remember to install Python on your ROS server too. - Launch
roscore
- Launch
rosrun rosserial_python serial_node.py tcp
- Publish something e.g.
rostopic pub /servo std_msgs/String 0/300
would send an instruction to set servo0
to300
(which is out of range).
- good notes on creating arrays for rosserial at
http://wiki.ros.org/rosserial/Overview/Messages
- use
check_urdf src/simple_arm/urdf/simple_arm.xacro
to check URDF is valid - use
roslaunch training_world training_world.launch
to launch world
- Build particle_ros_node.ino
- doesn't seem to work via cloud build...
- flash to device (via cloud is ok)
- check at https://console.particle.io/devices to see the status
notes: incorporates https://github.com/wojiaojiao/pegasus_gazebo_plugins