Building and Bundling Robotic Applications with Colcon
AWS RoboMaker works with robotics applications built and bundled with colcon. colcon
is a command line tool built by the Open Source
Robotics Foundationcatkin_make.
For more information about colcon, see Colconcolcon, see colcon-roscolcon, see colcon-bundle
Installing Colcon
Use the following commands to install colcon and
colcon-bundle:
apt-get update apt-get install python3-pip python3-apt pip3 install -U setuptools pip3 install -U colcon-common-extensions colcon-ros-bundle
If you already have colcon installed, you can install bundling support with the
following command:
pip3 install -U colcon-ros-bundle
Using Colcon to Build and Bundle
If you are migrating from catkin, verify the following
before you use colcon to build and bundle your robotic application:
-
All of the folders you want to include in the application are defined. For example, the following code includes common ROS folders
launchandnodesin the install directory created bycolcon. You can replace replacelaunchandnodeswith the folders used by your application. Make sure this block is defined in yourcMakeLists.txtfile:install(DIRECTORYlaunchnodesDESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} )For more information on
CMakeList.txtandcatkin, see catkin / CMakeLists.txton ROS.org. -
All of your application dependencies are installed through
rosdeporpip. Make sure all of your dependencies are added topackage.xmland/or an includedrequirements.txtfile. If a dependency is not available in the public rosdep sources lists, you can create a custom sources list. To do this, follow the instructions on ROS.org. For more information about troubleshooting, see Troubleshooting Colcon Build and Bundle. -
All of the arguments you are pathing through your launch file are defined as environment variables in the AWS RoboMaker simulation job. You can define environment variables using the console or the AWS RoboMaker SDK. For an example using an environment variable, see Using Environment Variables to Configure Play Back.
Use the following commands to build and then bundle your robotics application:
cdrobotic-application-workspacecolcon build colcon bundle
You can test your application prior to bundling and uploading with the following:
source install/setup.sh roslaunchpackage_namelaunch_file

