NRP network settings for real-time control of a robotic platform (tigrillo)


#1

Hi!

Following the story in the strategic experiment of SP10 WP4, we need to test and calibrate the Tigrillo roobot sensors and actuators on one side and the simulation model and gazebo plugins in the NRP on the other side to ensure similar behaviours and achieve a transfer between networks trained in simulation and that could run on the real robotic platform.

A first step is to control the real robot via the NRP. To that end, we re-factored the code of the robot itself to run over ROS. In the current state, it is now connected to the same wi-fi network and publish/listen to topics of the exact same type as its gazebo model counterpart. A test was made running the standard ROS gazebo package and gives encouraging results for working with the NRP.

However, I encountered an issue when trying to configure the NRP to perform the same. Indeed, in the NRP “local” setting mode, the roscore runs by default on http://localhost:11311/ which means that an other machine cannot reach its IP and port.

But if I change the ROS_MASTER_URI and ROS_HOSTNAME (as described here) respectively to http://192.168.1.2:5555/ and 192.168.1.2 (where 192.168.1.2 and 5555 are just examples of my machine local IP and a free port), and change the roscore command to roscore -p 5555 in the user_scripts/nrp_aliases, the NRP loads correctly but nothings happens when I start an experiment until I get a timeout (see cle-start error log here)!

Do you know where I could find a log about what’s going on? Is the roscore port or address literally declared somewhere and I forgot to change it?

Thanks!

Gabriel


#2

Hello Gabriel,

At first sight, there are two things which might cause you a problem:

ExDBackend/hbp_nrp_cleserver/hbp_nrp_cleserver/server/CLEGazeboSimulationAssembly.py, line 125:

local_ip = ifaddress[netifaces.AF_INET][0]['addr']
    ros_master_uri = os.environ.get(
        "ROS_MASTER_URI").replace('localhost', local_ip)

And also $HBP/user-scripts/nrp_variables (sourced by your .bashrc):
export ROS_IP=127.0.0.1

So you may tweak these lines and see if you can solve your issue. We could consider then a more flexible way to configure ROS for NRP.

Best regards,
Luc


#3

Hey Luc,

Thanks a lot, it was indeed the export ROS_IP=127.0.0.1 that was causing the problem. I made a search for localhost in the NRP repositories but I forgot to look for 127.0.0.1.

Best,

Gabriel