diff --git a/README.md b/README.md index 318eece2..b2090d6a 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,19 @@ The CRS (Collaborative Robotic Sanding) Application buit in ROS2 eloquent --- ### Workspace Setup +#### Create the workspace directory +``` +mkdir -p ~/crs_ws/src # Make a new workspace and source directory +cd ~/crs_ws/src # Navigate to the workspace source directory +git clone https://github.com/swri-robotics/collaborative-robotic-sanding.git # clone the repository +``` + #### Download source dependencies - Install [wstool](http://wiki.ros.org/wstool) - cd into your colcon workspace root directory - Run wstool as follows ``` + cd ~/crs_ws wstool init src src/collaborative-robotic-sanding/crs.rosinstall wstool update -t src ``` @@ -23,26 +31,31 @@ The CRS (Collaborative Robotic Sanding) Application buit in ROS2 eloquent - Install [rosdep](http://wiki.ros.org/rosdep) - From the root directory of your workspace run the following: ``` - rosdep install --from-path src --ignore-src -r + rosdep install --from-path src --ignore-src -ry ``` -#### Download additional resources +#### Download additional REQUIRED resources - ros-eloquent-launch-xml ``` sudo apt install ros-eloquent-launch-xml ``` This allows using xml formatted launch files -- QT5 is a dependency of [ros_scxml](https://github.com/swri-robotics/ros_scxml) therefore follow the instructions provided [here](https://github.com/swri-robotics/ros_scxml) +- **QT5**, which is a dependency of [ros_scxml](https://github.com/swri-robotics/ros_scxml) therefore follow the instructions provided [here](https://github.com/swri-robotics/ros_scxml) -#### Workarounds -- None at this moment - -#### Build +--- +#### Issues +- To run on hardware it is necessary to build the ros1 robot driver and the bridge in separate workspace, see instructions on that below. +--- +### Build +##### ROS2 Application +This will build the main application, from the workspace run the following ``` colcon build --symlink-install ``` +**This application is all that is necessary to run the system in simulation mode with gazebo** + +--- --- ### Setup #### Data Directory Create a soft link (shortcut) in the home directory as follows @@ -63,10 +76,19 @@ Create a soft link (shortcut) in the home directory as follows --- ### Hardware dependencies The following instructions are necessary when running on real hardware: -- Camera Driver -Go to [Framos Depth Camera](https://www.framos.com/en/industrial-depth-cameras#downloads). Download and Extract the [tar file](https://www.framos.com/framos3d/D400e/Software/FRAMOS_D400e_Software_Package_v1-8-0_Linux64_x64.tar.gz) and then install the FRAMOS-librealsense2-2.29.8-Linux64_x64.deb debian +#### Camera Driver +- Go to [Framos Depth Camera](https://www.framos.com/en/industrial-depth-cameras#downloads). Download and Extract the [tar file](https://www.framos.com/framos3d/D400e/Software/FRAMOS_D400e_Software_Package_v1-8-0_Linux64_x64.tar.gz) and then install the FRAMOS-librealsense2-2.29.8-Linux64_x64.deb debian +- Download source and debian dependencies + ``` + cd ~/crs_ws + wstool merge -t src src/collaborative-robotic-sanding/crs_hardware.rosinstall + wstool update -t src + rosdep install --from-path src --ignore-src -ry + colcon build --symlink-install + ``` + +#### Build ROS1 Robot Driver and Bridge +- Follow instructions [here](ROS1_BRIDGE_BUILD_INSTRUCTIONS.md) -- UR robot driver bridging over ROS1 -Coming soon ... diff --git a/ROS1_BRIDGE_BUILD_INSTRUCTIONS.md b/ROS1_BRIDGE_BUILD_INSTRUCTIONS.md new file mode 100644 index 00000000..00de8cf6 --- /dev/null +++ b/ROS1_BRIDGE_BUILD_INSTRUCTIONS.md @@ -0,0 +1,77 @@ +# Hardware Setup + +This application works on the Universal UR10 robot, as of now the ROS2 driver is not available therefore it is necessary to use the ROS1 bridge to allow the ROS1 robot driver to communicate with the ROS2 application + +--- +## Requirements +### ROS1 +- Install [ROS1 melodic](http://wiki.ros.org/melodic/Installation/Ubuntu) +### Catkin +- Install [catkin tools](https://catkin-tools.readthedocs.io/en/latest/installing.html) + +### Wstool +- Install [wstool](http://wiki.ros.org/wstool#Installation) +--- +## Setting up Wokrspaces +### ROS1 Workspace +This workspace contains the robot driver node and a few other essential componets +- Create a **crs_ros1_ws** ROS 1 workspace directory + ``` + source /opt/ros/melodic/setup.bash # Source ROS1 + mkdir -p ~/crs_ros1_ws/src # Make a new workspace and source directory + cd ~/crs_ros1_ws/ # Navigate to the workspace root + catkin init # Initialize it + ``` + > More info on catkin workspaces [here](https://catkin-tools.readthedocs.io/en/latest/quick_start.html) +- Clone the **collaborative-robotic-sanding-ros1** repository + ``` + cd ~/crs_ros1_ws/src + git clone https://github.com/swri-robotics/collaborative-robotic-sanding-ros1.git + ``` +- Download source dependencies with wstool + ``` + cd ~/crs_ros1_ws/ + wstool init src src/collaborative-robotic-sanding-ros1/crs.rosinstall + ``` +- Downlad debian dependences + ``` + rosdep install --from-path src --ignore-src -ry + ``` + > You'll need admin priviledges to install +- Build with catkin + ``` + catkin build + ``` +### ROS1 Bridge Workspace +This workspace contains the bridge implementation, it allows the ROS1 and ROS2 application to communicate. +#### WARNING!!! : **It is requried that the ROS1 amd ROS2 workspaces have been built prior to building the bridge* +- Create another workspace for the bridge + ``` + source /opt/ros/melodic/setup.bash # Source ROS1 + source /opt/ros/eloquent/setup.bash # Source ROS2 + mkdir -p ~/crs_ros_bridge_ws/src # Make a new workspace and source space + cd ~/crs_ros_bridge_ws/ # Navigate to the workspace root + ``` +- Clone the bridge repository + ``` + cd ~/crs_ros_bridge_ws/ + git clone https://github.com/swri-robotics/crs_ros_bridge_ws.git + ``` +- Download source dependencies + ``` + cd ~/crs_ros_bridge_ws/ + wstool init src src/crs_ros_bridge_ws/crs.rosinstall + ``` +- Downlad debian dependences + ``` + rosdep install --from-path src --ignore-src -ry + ``` + > You'll need admin priviledges to install +- Overlay CRS ROS1 and ROS2 workspaces +**!!!It is assumed that your ROS2 workspace is located in the `~/crs_ws/` directory** +- Source the workspaces in the following order + ``` + source ~/crs_ros1_ws/devel/setup.bash + source ~/crs_ws/install/local_setup.bash + colcon build --symlink-install + ```