ROS workspace for working with Constrained Deformable Coherent Point Drift and TrackDLO.
This workspace has been tested on ROS Noetic, which can be installed on an Ubuntu 20.04 OS with the below command.
sudo apt install ros-noetic-desktop-full
More details on ROS installation are available from the developers. Note: every terminal which uses ROS must source the ROS installation. A convenient way of automatically sourcing is to source the ROS installation in the .bashrc
file:
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
Using the RMDLO Tracking ROS Workspace requires desktop configuration of a GitHub SSH key.
First, install any necessary dependencies detailed in the original CDCPD installation instructions. Namely, install dependencies using the instructions to modify and run the cdcpd/install_scripts/install_dep.sh
script and obtain a Gurobi license.
Perform the below commands in a terminal.
# First update the local rosdep database.
~$ rosdep update
# Clone the ABB robot catkin workspace.
~$ git clone git@github.com:RMDLO/rmdlo_tracking.git --recurse-submodules
# Change to the root of the ABB catkin workspace, use rosdep to install missing dependencies.
~$ cd rmdlo_tracking/src && rosdep install -r --from-paths cdcpd -y && cd ..
# Build the workspace (using catkin_tools).
~/rmdlo_tracking$ catkin build
Additionally, test CDCPD to ensure it built properly.
# Run all unit tests to ensure the workspace built properly.
~/rmdlo_tracking$ cd src/cdcpd && ./test_cdcpd.sh
- Download the UM ARM Lab rosbag files.
- Perform the below commands in a terminal.
# Extract the bagged data to the CDCPD directory.
~$ cd ~/Downloads && unzip CDCPD_demo_data.zip -d ~/rmdlo_tracking/src/cdcpd/demos/ && rm ~/Downloads/CDCPD_demo_data.zip && cd ..
# Decompress the extracted rosbag files.
~$ cd ~/rmdlo_tracking/src/cdcpd/demos && ./unpack_rosbags.sh && rm -rf rosbags_compressed
- Open a new terminal and launch
roscore
- Open a new terminal and perform
# First source the workspace
~$ cd rmdlo_tracking && source devel/setup.bash
# Run the desired demo script, e.g.
~/rmdlo_tracking$ cd src/cdcpd/demos && ./launch_demo1.sh
After verifying this works, press Ctrl+C
on the terminal session to end it, and then perform killall -9 rosmaster
to stop the rosmaster from running in the background.
- Perform the below commands one terminal.
# Source the RMDLO Tracking ROS Workspace
~$ cd rmdlo_tracking && source devel/setup.bash
# Lanch the camera, Rviz, and visualize the color image, mask, and tracking result (in 2D and 3D)
~/rmdlo_tracking$ roslaunch TrackDLO realsense_node.launch
- Open a second terminal and perform the below commands.
# Source the RMDLO Tracking ROS Workspace
~$ cd rmdlo_tracking && source devel/setup.bash
# Start the tracking algorithm and publish tracking results.
~/rmdlo_tracking$ rosrun TrackDLO tracking_ros_dev.py
See the original CDCPD repository, the RMDLO CDCPD Installation Instructions, and the TrackDLO README.md for more information.