How to set a fix port to roslaunch?
I work in a company network with a strict firewall setting. I start the roscore
and the roslaunch
on the robot and the RViz is started on my desktop PC. The roscore has the port 11311. The port was block so that I couldn't start the RViz on my PC. Now, the port 11311 is open, and RViz can be started. However, the rostopics are blocked.
If I see on the console of my robot, I can see these messages for instance:
started roslaunch server http://x.x.x.x:45287/
SUMMARY
.....
auto-starting new master
process[master]: started with pid [16014]
ROS_MASTER_URI=http://x.x.x.x:11311/
On the robot console I can see the rostopic output with rostopic echo mytopic
. However, on my PC the rostopic echo mytopic
doesn't print anything. Thus, my observation is that the rostopics are transfered through the blocked port 45287. Is my observation correct? If yes, how can I start the roslaunch
with a fix port? The port of the roslaunch
is always random.
Running roslaunch -p 45287 mynode mylaunch.launch
set the port of the roscore
master. I can request a certain port to be opened to the network admin, but not a range of ports.