Start Gazebo at the same time as an external ROS compliant application
Dear all,
I have a simulation environment developed on gazebo that gets launched with a typical roslaunch file... However, this simulation has now, different external applications that use ROS libraries on their code, that interact with the gazebo simulation in different ways and to simplify the workflow of these simulations, it would be optimal to guarantee that all this applications were being started at the same time as Gazebo launches...
Which should be the best way to do this? A bash script isn't quite a solution right now, since I can't seem to properly code one that just starts the gazebo environment directly...
Best regards, Bruno Vieira
can you clarify what this means exactly?
And why this is so important?
It means that I would require these applications to start at the same time or using the same "command" as the roslaunch I launch to start the gazebo environment... It is important because these applications interact and depend on the gazebo simulation to properly work.
So would it be sufficient to start those non-ROS applications using
roslaunch
?If so, see: #q272267.
I couldn't quite understand how I'm able to include this "non-ros application" into the roslauch script... For example, one of my applications gets initiated by a similar command to this:
cmake --build build --target APPNAME
being APPNAME the name of the application that gets started. Any possible input on how can i possibly include this in a typical roslaunch file?
CMake is typically a tool invoked during the build phase of your program, not the runtime phase.
Your question seemed to be about how to orchestrate the runtime phase of multiple ROS and non-ROS applications, not their build phases.
Are you sure that you use CMake to start your application(s)?
Yes, i use exactly that command to start my applications, since it allows me to build all my code and then start that APPNAME script to launch it
It's probably possible to invoke
cmake
from a.launch
file, but I question your current development workflow. Building is very much a separate phase from runtime. I get the convenience you get from invoking a build target that also starts your application, but it might complicate what you're trying to do here.After building a workspace, you'll need to re
source
it. If you add or remove packages,source
ing is required. I'm not sure how (and whether)roslaunch
will be able to cope with that.But simply invoking
cmake
should not be a problem.Yes I agree that this workflow should be improved. However, about the availability of calling this during a roslaunch phase, how should I properly do it?