Getting Started
Here, we will setup your environment to use Cartesian Motion Base (CMB) and run a simple example. CMB is designed to work with cartesian controllers in ROS 2. But, you can also use other controllers that support Cartesian commands.
1. Installation ROS 2 distribution and tools:
Make sure you have ROS 2 Humble or later installed on your system.
Install rosdep to install system dependencies:
sudo apt install python3-rosdep
sudo rosdep init
rosdep update
Install vcstool:
sudo apt install python3-vcstool
Install cyclonedds for ROS 2 communication(if you haven’t already):
sudo apt install ros-humble-rmw-cyclonedds-cpp
echo "export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp" >> ~/.bashrc
2. Download the cartesian_motion_base source code:
mkdir -p ~/cmb_ws/src
cd ~/cmb_ws/src
git clone https://github.com/leledeyuan00/cartesian_motion_base.git
vcs import < cartesian_motion_base/cartesian_motion_base.repos
3. Build your colcon workspace:
cd ~/cmb_ws
rosdep install --from-paths src --ignore-src -r -y
colcon build --symlink-install
4. Setup your environment:
Source the workspace:
source ~/cmb_ws/install/setup.bash
Optional: add the previous command to your ~/.bashrc:
echo "source ~/cmb_ws/install/setup.bash" >> ~/.bashrc
Note
Sourcing the setup.bash automatically in your ~/.bashrc is
not required and often skipped by advanced users who use more than one
Colcon workspace at a time, but we recommend it for simplicity.
5. Next Steps
Nice job! Next, we will visualize a simple Cartesian motion example using Gazebo