This a simulation of a 4-DOF robotic arm in Gazebo, using ROS. This follows the simple architecture of a traditional industrial arm, with a base link, torso, upper arm, lower arm and hand. The position of the joints are entered by running the move_arm node joy_pos.py program in another terminal. This arm is designed without using meshes, hence it has a very basic geometrical structure. The model is spawned in Gazebo.
This is a repository is one of my projects to study how a robotics arm movement should be. Also, this would give us an idea of how we can improve the robotics arm system to be used in daily life.
The bot is designed using a URDF (Unified Robotic Description Format), which is an XML file format. The links about the robots are specified in the URDF file. They are:
- base_link: The base of the arm, which is fixed to the gazebo world.
- torso: Connected to base_link. Connected by a continuous joint.
- upper_arm: Connected to torso. Connected by a revolute joint for restricted motion.
- lower_arm: This is connected to upper_arm by a revolute joint.
- hand: Connected to lower_arm by a continuous joint.
The joints that connect the various links are: (joint: child_link to parent_link)
- fixed: base_link to world
- hip: torso to base_link
- shoulder: upper_arm to base_link
- elbow: lower_arm to upper_arm
- wrist: hand to lower arm
The motion of these joints is enabled by transmissions and the gazebo plugins.
The motion planning of the arm is done by publishing messages to the /arm_controller/command topic in ROS. The message type this topic takes if of type trajectory_msgs/JointTrajectory
The message type of the above message file is:
std_msgs/Header header
uint32 seq
time stamp
string frame_id
string[] joint_names
trajectory_msgs/JointTrajectoryPoint[] points
float64[] positions
float64[] velocities
float64[] accelerations
float64[] effort
duration time_from_start
To move the arm we are changing the position values of the positions list on the JointTrajectoryPoint, which is subsribed by gazebo node (as seen in the rqt_graph in the section below) The gazebo node takes these values and are published to /joint_states topic, which is subscribed by the robot_state_publisher node(again, refer rqt_graph) which then maps it to gazebo ui and RoboHW.
This is a brief overview of how the arm is moving on inputting the desired position inputs.
I have referred the book 'Programming Robots with ROS' for modelling the arm.
This is version 1.0. We are planning several updates and they will be uploaded here. Update:
- Added gripper to the urdf model. Version 1.0.1
- Modified python script to control node. Version 1.1
- Increased range of shoulder joint.
- Added functionality to change only position of one joint. Version 1.1.1
- Change the control from terminal command to joysticks
If cloning the repository, clone it in your catkin_ws/src folder and run catkin_make command.
After running catkin_make. Open a terminal. Run roscore.
Open a new tab in terminal.
- Move in the catkin_ws directory using
cd catkin_ws. - Once there type the following command in terminal -
source devel/setup.bash. - Now type,
roslaunch robot_arm bot.launch, to launch gazebo.
Open another tab in terminal. Repeat steps 1 and 2 from above paragraph. Now run rosrun joy joy_node, rosrun robot_arm joy_pos.py, to perform actions on the arm.




