Unable to launch file in realrobot lab (Unable to contact my own server at http://master)

I had a booking for checking my code on 30 April and the system was not responding. I was able to successfully able to connect with the robot as i was able to move the robot using joystick and rostopic list was also working. But when i was launching the code it was giving an error machine cannot connect to itself. I wasted my 1 hr and my slot for the testing my code. Kindly do revert back as soon as possible.

regards
Sumedh Mulimani

Please let us know which code you are launching specifically.

And how are you launching this code? If teleop is working, it suggests that something in your code might be causing this problem.

I suggest that you try again and give us more information (screenshots and code) if it does not work.

I am not sure if teleop is working but the joystick on the screen was definitely working.I also checked if /find_wall server was working and it was. I am attaching my code below. i was launching it as roslaunch topics_quiz main.launch









Hi @sumedh, what you report is normal. Don’t expect your code to work on the real robot on the first time. That is the reason we introduced the real robot, so you must learn the difficulties of working with a real robot, a lot more complex than dealing with simulations.

Do not get discouraged. You can achieve it. Keep posting your questions and doubts here and we will guide to the success

so should i book a slot again and try running my code ?

Yes, please do that.

One thing that you need to adjust in your code is the cmd_vel speed. The robot has a speed limit that is stated in the rosject.

One way to debug is to check if messages are getting to the topics your code is publishing or subscribed to.

I tried once again and was still not able to complete it. I was getting the same error of not able to connect to the server but the master was pinging. Then launched the task 1 only. In that i was able to run the program without any error but the robot was not moving. Then i echoed /cmd_vel as was not getting any result. I also checked the /scan in which i was getting the values of the sensor.




Hi @sumedh,

I don’t know if you have setup a robot locally or your own computer to be able to connect to it through The Construct.

If that was the case, when you run the script for connecting your own robot/computer to The Construct, you have the following variables that are added to the ~/.bashrc file:

export ROS_IPV6=on
export ROS_MASTER_URI=http://master:11311
export ROS_HOSTNAME=master
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
export CYCLONEDDS_URI=file:///var/lib/theconstruct.rrl/cyclonedds.xml
export FASTRTPS_DEFAULT_PROFILES_FILE=/var/lib/theconstruct.rrl/fastdds_husarnet.xml

Could it be that you have also added those variables to the ~/.bashrc used in this rosject?

You can check that with:

tail ~/.bashrc

If that is the case, you can “comment/unset” those variables using the command below:

sed -i 's/^export /#export /g' ~/.bashrc 

The command above will replace all "export " commands with "#export ", disabling the variables export. After that, please connect to the robot again.

When connecting to the robot, you are not supposed to modify the .bashrc on the rosject. The connection-related variables are exported automatically. YOu don’t have to manually do that on the rosject.

Looking at the variables aforementioned, the probable reason for the problem is that you may have:

export ROS_HOSTNAME=master

But the robot also has the ROS_HOSTNAME as master.

When you run roslaunch, instead of connecting to the robot, roslaunch tries to connect to the rosject computer itself (since ROS_HOSTNAME says that the rosject hostname is named master instead of X_xterm), and it fails, because the rosject doesn’t have roscore running, but the robot has.

To summarize:

  • Please disable all exports from your .bashrc that are related to robot connection. then this message above goes away:

Unable to contact my own server at http://master:…

  1. The robot already has ROS_HOSTNAME=master
  2. The rosject is expected to have ROS_HOSTNAME=X_xterm , where X is a number , and this is set automatically. You don’t have to manually export this variable

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.