The package was made using ROS2 Humble
You need to have installed:
- ros-xacro:
sudo apt install ros-<ros2-distro>-xacro
- ros-joint-state-publisher:
sudo apt install ros-<ros2-distro>-joint-state-publisher-gui
- gazebo-ros:
sudo apt install ros-<ros2-distro>-gazebo-ros-pkgs
- colcon:
sudo apt install python3-colcon-common-extensions
The design was made in fusion360 and used a fusion2urdf exporter to obtain the urdf files needed
To build the packages in this repository follow these steps:
cd
into an existing or create a new workspacemkdir -p robotarm/src
- clone this repository in the
src
folder of your workspacecd robotarm/src
git clone https://github.com/odobot/fivedofarmzup_description.git
- Naviage back to the workspace folder
cd ../
- build the workspace using the colcon build tool
colcon build --symlink-install
- source the
setup.bash
filesource install/setup.bash
- You can add the
setup.bash
file on the bashrc script file, just open the file and add it at end:gedit ~/.bashrc
source ~/robotarm/install/setup.bash
To view the urdf in rviz open 3 terminals:
On the first terminal (needs to the terminal you sourced your setup.bash file in) type:
ros2 launch fivedofarmzup_description robot_description.launch.py
Second terminal
rviz2
In rviz for the Fixed frame use base_link
add RobotModel at the Displays under the robot model there is Description topic add /robot_description
third terminal
ros2 run joint_state_publisher_gui joint_state_publisher_gui
To launch your robot arm in gazebo, run:
ros2 launch fivedofarmzup_description robot_gazebo.launch.py
To launch rviz2, joint_state_publisher_gui and the robot all at once use the command:
ros2 launch fivedofarmzup_description robot_sim.launch.py
Gazebo will be launched haven't added the needed code for the arm to be launched in it thus you can just close Gazebo if it opens.(will be adding the code soon)