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
- ros2-control and ros2-controllers:
sudo apt install ros-<ros2-distro>-ros2-control ros-<ros2-distro>-ros2-controllers
- 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 slambot/src
- clone this repository in the
src
folder of your workspacecd slambot/src
git clone https://github.com/odobot/slambot.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 ~/slambot/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 slambot 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 slambot gazebo.launch.py