Ask Your Question
1

Is it possible to use roslaunch without starting roscore?

asked 2020-07-09 08:32:52 -0500

fabriceN gravatar image

updated 2022-05-23 09:22:49 -0500

lucasw gravatar image

Here is the setup

I have an application running on a Jetson nano which is started with roslaunch. I am running ROS-Melodic on that computer and I consider it as the ROS_MASTER_URI. As the application is using roslaunch, roscore is started as well.

On my laptop I want to start another application which is using roslaunch as well, and this is the beginning of my problem, because per default roslaunch starts a roscore on the local machine.

Is it possible to prevent the start of roscore with roslaunch?

Thank you for your help

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2020-07-09 09:12:57 -0500

Dragonslayer gravatar image

link text Have a look at the link. I use ROS_MASTER_URI and ROS_HOSTNAME placed in the bashrc´s . roslaunch only starts a roscore if there is none running.

edit flag offensive delete link more

Comments

@Dragonslayer, on the jetson nano I setup (for instance) ROS_MASTER_URI=http://10.10.10.10 and ROS_HOSTNAME=10.10.10.10 I start roslaunch appli appli.launch Now on my Laptop i will setup: ROS_MASTER_URI=http://10.10.10.10 and ROS_HOSTNAME=10.10.10.9 and what I want is that the application spawn by roslaunch get topics from the application on the jetson nano. Unfortunately when I run roslaunch on my laptop, ROS is starting a roscore locally which means that I cannot access the topics published by the application of the jetson nano. Do you know if there is any possibility to prevent roslaunch to start a roscore?

fabriceN gravatar image fabriceN  ( 2020-07-09 09:33:06 -0500 )edit

If ROS_MASTER_URI and ROS_IP/ROS_HOSTNAME are set correctly, then the answer from @Dragonslayer is correct, roslaunch on the computer that shouldn't run master should not start a master. To answer the question in the comment above, you could try adding --wait to your roslaunch call to cause it to wait for a master before launching

jarvisschultz gravatar image jarvisschultz  ( 2020-07-09 10:16:21 -0500 )edit
1

@fabriceN I came across lots of people with issues getting this to run. For some a simple restart did the trick. Iam also not sure if launching the core on the jetson and after that "setup:" the stuff on the laptop might be the problem, could be the the roscore start sents a trigger or something like that, that is missed if you only setup the laptop after the core start etc. Of course turning off the firewalls (or preparing them in a way that data can flow) is absolut relevant. As I mentioned I have this in my bashrc`s so it sets itself up and that works fine, also for others. Pinging works? @jarvisschultz good idea "--wait".

Dragonslayer gravatar image Dragonslayer  ( 2020-07-09 10:47:12 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-07-09 08:32:52 -0500

Seen: 552 times

Last updated: Jul 09 '20