If you want to reuse launch/rosbridge_websocket.launch
, then you could probably get away with pushing both instances into their own namespaces.
I haven't tried it, but something like:
<launch>
<include ns="bridge0" file="$(find rosbridge_server)/launch/rosbridge_websocket.launch">
<!-- use default port -->
<arg name="port" value="9090" />
</include>
<include ns="bridge1" file="$(find rosbridge_server)/launch/rosbridge_websocket.launch">
<!-- use other port -->
<arg name="port" value="9091" />
</include>
</launch>
You can override any of the arg
s in rosbridge_websocket.launch
in the same way.
Note that this will prefix all topics, services and actions that the rosbridge_websocket
node creates/offers with the value in the ns
attribute of the include
tag.
If you want to avoid using namespaces, you could just copy rosbridge_websocket.launch
to a package of your own (in your workspace), and copy the relative entries while making sure to change the name
attribute of the node
tag that starts rosbridge_websocket
. But note that this will not work if rosbridge_websocket
creates any global topics, services or actions, as they will then clash with each other.