-
Notifications
You must be signed in to change notification settings - Fork 1
Deployment
In order for a node to be installed to the robot with the pal_deploy tool, they have to be marked for installation. This means the CMakeLists.txt of the node has to contain
install(TARGETS name_of_node
RUNTIME DESTINATION
${CATKIN_PACKAGE_BIN_DESTINATION})
If you also have launch files, in order for them to be installed as well include:
install(DIRECTORY launch/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch)
In order to deploy a node to the robot that you have working on your local workspace in the docker image from pal, you can run from the workspace folder (make sure you have added ari in /etc/hosts as described in Network, or else replace ari in the next two commands with ARI's IP):
rosrun pal_deploy deploy.py ari
This will deploy all the packages in the workspace. If you want to deploy a single package, run
rosrun pal_deploy deploy.py ari -p name_of_package
PAL provides a node which handles startup of nodes. In order to add our own nodes to startup, create a file called node_name.yaml in the directory /home/pal/.pal/pal_startup/apps/ with the content:
roslaunch: "package_name launch_file.launch"
dependencies: []
The dependencies list are other such apps in the same folder, and you would name them without the .yaml suffix, such as
roslaunch: "package_name launch_file.launch"
dependencies: ["node_name_2"]
Then, after having created the .yaml file for the package launch, you must add it to the control group launch. To do this, go to the directory /home/pal/.pal/pal_startup/control/ and either create a new .yaml file, to create a new launch group, or edit an existing one. There, simply add a line containing
- node_name
which is the name of the .yaml file created, without the .yaml suffix. Next time the robot boots, the node will launch.
See the official docs here. Note that ~/.pal/pal_startup/, apps/, and control/ might not exist in which case you can just create them yourself.