Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ros::init() before creating the first NodeHandle #15

Closed
osrf-migration opened this issue Jul 11, 2018 · 9 comments
Closed

ros::init() before creating the first NodeHandle #15

osrf-migration opened this issue Jul 11, 2018 · 9 comments
Labels
bug Something isn't working major

Comments

@osrf-migration
Copy link

Original report (archived issue) by Brian Bingham (Bitbucket: brian_bingham).


Working in default branch. When I run roslaunch robotx_gazebo sandisland.launch, I get error...

#!bash
[FATAL] [1531350486.327760996]: You must call ros::init() before creating the first NodeHandle

...

Couldn't find an AF_INET address for []

If I edit the sandisland.launch file to use the world: "$(find robotx_gazebo)/worlds/sandisland.world
then the error goes away.

Ran out of time to chase this one to ground.

@osrf-migration
Copy link
Author

Original comment by Brian Bingham (Bitbucket: brian_bingham).


@kev-the-dev Could you see if you get a similar issue on your end?

@osrf-migration
Copy link
Author

Original comment by Kevin Allen (Bitbucket: kev-the-dev).


I can't reproduce this issue running off the current default branch. To see if it's some networking issue, try roslaunch gazebo_ros empty_world.launch ---screen

@osrf-migration
Copy link
Author

Original comment by Brian Bingham (Bitbucket: brian_bingham).


Thanks for checking.

Gazebo runs fine - as expected - just can't seem to example_course.world file. Will dig deeper...

@osrf-migration
Copy link
Author

Original comment by Kevin Allen (Bitbucket: kev-the-dev).


Hmm the difference with example_course may be that it has scan the code. I'd try updating ROS sudo apt upgrade and rebuilding the workspace

@osrf-migration
Copy link
Author

Original comment by Brian Bingham (Bitbucket: brian_bingham).


Have a bit more information. Seems that the following warning and error are both associated with the gazebo_ros_color plugin. If I leave that plugin within the light_buoy model.sdf file, I get this...

[ INFO] [1531414068.832072458, 2.002000000]: Command timeout!
Warning [parser.cc:437] Converting a deprecated SDF source[data-string].
[FATAL] [1531414069.166852757]: You must call ros::init() before creating the first NodeHandle
[ INFO] [1531414069.329668602, 2.501000000]: 0: 0.0414236 / 0.000165695

If I comment out that plugin from the model.sdf, then everything works as expected.

I attempted to add explicit ros::init to the plugin, but no joy.

Strange that the error can't be replicated.

@osrf-migration
Copy link
Author

Original comment by Carlos Agüero (Bitbucket: caguero, GitHub: caguero).


I cannot reproduce it either but just wondering if this might be a timing issue. One idea could be to move the lines:

nh_ = ros::NodeHandle(ns);
color_sub_ = nh_.subscribe(topic_name, 1, &GazeboRosColor::colorCallback, this);

from gazebo_ros_color.cc::Load() to gazebo_ros_color.cc::Init().

@osrf-migration
Copy link
Author

Original comment by Brian Bingham (Bitbucket: brian_bingham).


Damn - I think it was an update issue. I just did a system upgrade issue and it seems to have taken care of it.

Perhaps we should add some more specificity to your System Requirements to explicitly specify what updates need to be installed? Or, perhaps better just to make in implicit that the system needs to be at the most current.

I do still get the warning...

Warning [parser.cc:437] Converting a deprecated SDF source[data-string].

Perhaps related to this issue?

I'm not sure what the incompatible package was, but here is what now works on my system...

bsb@aku:~/vmrc_ws/src$ apt list --installed | grep gazebo

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

gazebo7/xenial,now 7.0.0+dfsg-2 amd64 [installed]
gazebo7-common/xenial,xenial,now 7.0.0+dfsg-2 all [installed,automatic]
gazebo7-plugin-base/xenial,now 7.0.0+dfsg-2 amd64 [installed,automatic]
libgazebo7/xenial,now 7.0.0+dfsg-2 amd64 [installed,automatic]
libgazebo7-dev/xenial,now 7.0.0+dfsg-2 amd64 [installed]
ros-kinetic-gazebo-dev/xenial,now 2.5.17-0xenial-20180607-142040-0800 amd64 [installed,automatic]
ros-kinetic-gazebo-msgs/xenial,now 2.5.17-0xenial-20180607-142015-0800 amd64 [installed,automatic]
ros-kinetic-gazebo-plugins/xenial,now 2.5.17-0xenial-20180607-142447-0800 amd64 [installed]
ros-kinetic-gazebo-ros/xenial,now 2.5.17-0xenial-20180607-142334-0800 amd64 [installed]
ros-kinetic-gazebo-ros-control/xenial,now 2.5.17-0xenial-20180607-143339-0800 amd64 [installed]
ros-kinetic-gazebo-ros-pkgs/xenial,now 2.5.17-0xenial-20180607-145241-0800 amd64 [installed]
ros-kinetic-hector-gazebo/xenial,now 0.5.0-0xenial-20180607-162110-0800 amd64 [installed]
ros-kinetic-hector-gazebo-plugins/xenial,now 0.5.0-0xenial-20180607-143740-0800 amd64 [installed]
ros-kinetic-hector-gazebo-thermal-camera/xenial,now 0.5.0-0xenial-20180607-152748-0800 amd64 [installed,automatic]
ros-kinetic-hector-gazebo-worlds/xenial,now 0.5.0-0xenial-20180607-145938-0800 amd64 [installed,automatic]

@osrf-migration
Copy link
Author

Original comment by Brian Bingham (Bitbucket: brian_bingham).


  • changed state from "new" to "resolved"

May want to add documentation on having to do an update, but otherwise done.

@osrf-migration
Copy link
Author

Original comment by Kevin Allen (Bitbucket: kev-the-dev).


It was likely gazebo-ros-pkgs as discussed in this PR. I added a version requirement in PR#19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working major
Projects
None yet
Development

No branches or pull requests

1 participant