Can I execute several nodes belong to different workspaces?
I want to use several workspaces.
But sometimes I need to execute several nodes from the package which are belonging to the different workspaces. (My point is that I don't want workspace overlapping structure. I want to execute several nodes those are totally not included in the same workspace)
Is it possible to pub, and sub between those nodes? Even if their package belongs to the different workspace?
Asked by jsk on 2018-02-26 21:45:08 UTC
Answers
Yes, this is possible. They only have to share one ROS master. You have to source the respective Workspace in the terminal where you launch the nodes, though.
However, IMO, this is not what you should do. This could easily lead to strange behaviour as it could take, e.g., some stuff from workspace1 in one terminal, and from /opt/ros in a second. This is why you typically do workspace overlaying. Why don't you want to do that?
Asked by mgruhler on 2018-02-27 01:57:16 UTC
Comments
I'm now writing high dof controller based on RBDL in one workspace. But I also want to write the high dof control based on different library. Thus, I want to write the new controller in the new workspace, but I still want to use the ros control and gazebo simulation environment included in first ws.
Asked by jsk on 2018-02-27 03:56:18 UTC
This is the reason why I want to use the several nodes from different workspace. You mean that, if I source respective workspace in each nodes terminal, then there will be work and it will not make any weird behavior. Is my understanding okay?
Asked by jsk on 2018-02-27 03:56:57 UTC
And, Thanks for your answer :D
Asked by jsk on 2018-02-27 03:57:13 UTC
None of what you write makes overlaying impossible / undesirable, but as @mig writes, you can definitely start nodes from completely stand-alone workspaces. You just can't start them from the same launch file, as roslaunch
will not be able to find the nodes from the other workspace.
Asked by gvdhoorn on 2018-02-27 03:57:53 UTC
@gvdhoorn If I use the totally independent terminals and source each workspace in each terminal, there will be no problem when executing and communicating several nodes from several workspace.(Obviously under one roscore) This sentence can be a wrap up sentence?
Thanks for your knowledge sharing:D
Asked by jsk on 2018-02-27 04:05:41 UTC
Comments