How do you launch your systems?

Longtime lurker here, but this can easily be solved with a systemd service. I use ansible to manage our fleet of robots, install dependencies and keep things running and at expected configurations. This gives an example of setting services that your ROS nodes need as a dependency, setting environment variables, and pre-flight commands before launching our ros node. Note the jinja templating inside of the curly braces. This allows us to run the same service/template regardless if we are prototyping on Ubuntu or on our custom operating systems compiled from yocto. Here is a generic version of our template for the systemd service:

Looks like you forgot a paste?

We use docker compose that start launch files, separate launchfile as much as we can to keep it modular and have one container per launchfile, then pass yaml files for common configurations and environment variables or cli arguments for more specific ones.
It’s quite verbose but easy to determine what is the problem when it pops and it ensures not everything fails at the same time. The only pitfall we experience at the moment is the accumulation of logs in each container in ~/.ros, we still need to figure out how to disable them.

While developing an application, I launch every node in different terminal for debugging and analysing the system. But, once I am done writing the application. I collect every node and launch file into a single launch file.

What I and others will like if ROS provides some package to create a GUI with buttons to launch different nodes. A kind of wrap up all the nodes in a single executable.

rosmon - ROS Wiki :sunglasses:


Thanks, I did not know that. This is why one should be part of a community. :smiley:

Hi @dvoid,

I think you forgot to paste…! I’d love to try your solution!

Pito Salas
Faculty, Computer Science
Brandeis University

I didn’t, but it looks like Discourse removes anything indented. Here is the data without an indent.

Description=Robot software control system

Environment=CATKIN_DIR={% if ansible_os_family == "Debian" %}/home/catkin_ws{% else %}/home/root/catkin_ws{% endif %}

ExecStartPre=/bin/bash -c 'echo "800000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq'
ExecStartPre=/bin/bash -c 'echo "running command"'
ExecStartPre=/bin/bash -c '/usr/sbin/randomcommand -check'
ExecStart=/bin/bash -c -l '{% if ansible_os_family == "Debian" %}source /opt/ros/{{ ros_codename }}/setup.bash; {% else %}{% endif %}source ${CATKIN_DIR}/devel/setup.bash; /opt/ros/{{ ros_codename }}/bin/roslaunch launch_dir launch_file.launch hostname:="{{ ansible_nodename }}"'


You’ll have better luck getting answers by creating a new thread. This question doesn’t have anything to do with the topic here.

what about osrf capabilities server?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.