ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
4

Invalid node name gazeboo when trying to launch gazebo empty world

asked 2013-06-25 11:52:13 -0500

sunzun gravatar image

updated 2013-06-26 08:14:36 -0500

When trying to launch an empty world in gazebo using the command

roslaunch gazebo_worlds empty_world.launch

I encounter the error

Invalid node name [gazeboo/�]: node names cannot contain /

Is there a known fix for this issue?


The full error is:

terminate called after throwing an instance of 'ros::InvalidNodeNameException' what(): Invalid node name [gazeboo/�]: node names cannot contain / Msg Waiting for master Aborted (core dumped) Error [Connection.cc:477] Connection[0] Closed during Read terminate called after throwing an instance of 'boost::system::system_error' what(): Connection reset by peer [gazebo-2] process has died [pid 18337, exit code 134, cmd /opt/ros/groovy/stacks/simulator_gazebo/gazebo/scripts/gazebo /opt/ros/groovy/stacks/simulator_gazebo/gazebo_worlds/worlds/empty.world __name:=gazebo __log:=/home/dhruv/.ros/log/6ed9ee8a-dde5-11e2-a0c6-0026c789069a/gazebo-2.log]. log file: /home/dhruv/.ros/log/6ed9ee8a-dde5-11e2-a0c6-0026c789069a/gazebo-2.log Aborted (core dumped) [gazebo_gui-3] process has died [pid 18346, exit code 134, cmd /opt/ros/groovy/stacks/simulator_gazebo/gazebo/scripts/gui __name:=gazebo_gui __log:=/home/dhruv/.ros/log/6ed9ee8a-dde5-11e2-a0c6-0026c789069a/gazebo_gui-3.log]. log file: /home/dhruv/.ros/log/6ed9ee8a-dde5-11e2-a0c6-0026c789069a/gazebo_gui-3.log


Launch file:

<launch>

<arg name="paused" default="false"/> <arg name="use_sim_time" default="true"/> <arg name="gui" default="true"/> <arg name="throttled" default="false"/>


<group if="$(arg use_sim_time)"> </group>

<group if="$(arg paused)">

<group if="$(arg throttled)"> <node name="gazebo" pkg="gazebo" type="gazebo" args="-u $(find gazebo_worlds)/worlds/empty_throttled.world" respawn="false" output="screen"/> </group>

<group unless="$(arg throttled)"> <node name="gazebo" pkg="gazebo" type="gazebo" args="-u $(find gazebo_worlds)/worlds/empty.world" respawn="false" output="screen"/> </group> </group> <group unless="$(arg paused)">

<group if="$(arg throttled)"> <node name="gazebo" pkg="gazebo" type="gazebo" args="$(find gazebo_worlds)/worlds/empty_throttled.world" respawn="false" output="screen"/> </group>

<group unless="$(arg throttled)"> <node name="gazebo" pkg="gazebo" type="gazebo" args="$(find gazebo_worlds)/worlds/empty.world" respawn="false" output="screen"/> </group> </group>

<group if="$(arg gui)"> <node name="gazebo_gui" pkg="gazebo" type="gui" respawn="false" output="screen"/>
</group>

</launch>

edit retag flag offensive close merge delete

Comments

Did you try changing the node name ? Try re-naming the node name from its current value to something else, just 'gazebo' for instance. And also please update the question with your launch file.

prasanna.kumar gravatar image prasanna.kumar  ( 2013-06-25 13:31:40 -0500 )edit

I believe the issue is in the ROS api for the gazebo. I haven't made any modifications to the standard groovy install for gazebo (I'm just attempting to run the launch file that ships with the package). I've posted the launch file.

sunzun gravatar image sunzun  ( 2013-06-26 08:06:37 -0500 )edit

I would go through the source code myself, but it's thousands of lines of code, and a simply searching for "gazeboo" leads me to believe the issue is not as simple as a typo. Of course, I could be wrong, but I couldn't find where the issue was myself.

sunzun gravatar image sunzun  ( 2013-06-26 08:10:33 -0500 )edit

I have the same problem, I hope to find the way to solve this.

RC gravatar image RC  ( 2013-06-26 19:13:32 -0500 )edit

Did anyone resolve this issue?

fberger gravatar image fberger  ( 2014-04-25 10:31:47 -0500 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2013-07-09 11:23:27 -0500

sunzun gravatar image

Okay, so there's apparently an issue with parsing the input argc/argv arguments when initializing the node in the file

/opt/ros/groovy/stacks/simulator_gazebo/gazebo/src/gazebo_ros_api_plugin.src

I fixed this by explicitly defining the node name in the function

void GazeboRosApiPlugin::Load(int argc, char** argv)

by replacing

ros::init(argc,argv,"gazebo",ros::init_options::NoSigintHanlder);

with

std::map<std::string,std::string> remappings; remappings["gazebo"] = "gazebo"; ros::init(remappings,"gazebo",ros::init_options::NoSigintHanlder);

Probably not the most elegant solution, nor does it actually address the root cause of this issue, but it fixes the problem.

edit flag offensive delete link more

Comments

I had the same issue and tried your suggestion above. Do you perform a 'rosmake -a' afterwards in order to compile?

octavian gravatar image octavian  ( 2013-08-22 13:31:28 -0500 )edit

Sunzun, are there any steps to do after editing the file? Also, are you editing gazebo_ros_api_plugin.src or gazebo_ros_api_plugin.cpp? Your instructions so far haven't gotten it to work for me...

fberger gravatar image fberger  ( 2014-04-25 10:31:18 -0500 )edit
1

answered 2014-04-26 10:00:36 -0500

fberger gravatar image

I thought I'd explain Sunzun's solution with a bit more detail.

First edit: /opt/ros/groovy/stacks/simulator_gazebo/gazebo/src/gazebo_ros_api_plugin.cpp

By replacing:

// setup ros related
if (!ros::isInitialized()) {
   ros::init(argc,argv,"gazebo",ros::init_options::NoSigintHandler);
 else 
    ROS_ERROR("Something other than this gazebo_ros_api plugin started ros::init(...), command line arguments may not be parsed properly.");

with:

// setup ros related
if (!ros::isInitialized()) {
    std::map<std::string,std::string> remappings; 
     remappings["gazebo"] = "gazebo"; 
     ros::init(remappings,"gazebo",ros::init_options::NoSigintHandler);
  } else {
    ROS_ERROR("Something other than this gazebo_ros_api plugin started ros::init(...), command line arguments may not be parsed properly.");
  }

It is important to add the brackets around the if and else statement since we now have multiple instructions within the if statement clause.

Now, in order to re-compile the package with the changes, this is perhaps a little bit of a hack but you need to first delete the ROS_NOBUILD file from within /opt/ros/groovy/stacks/simulator_gazebo/gazebo This will tell rosmake to recompile this package.

If you attempt to run rosmake simulator_gazebo, you will get a permission denied error, so now you need to temporarily change the ownership of the simulator_gazebo package.

sudo chown -R %YOUR_USER_NAME%: simulator_gazebo

Now you should be able to run:

rosmake simulator_gazebo

And it should re-compile your changes to the file!

Now, run:

 roslaunch gazebo_worlds empty_world.launch

and Enjoy!

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2013-06-25 11:52:13 -0500

Seen: 1,386 times

Last updated: Apr 26 '14