freefloating-gazebo/freefloating_gazebo

You must call ros::init() before creating the first NodeHandle

Closed this issue · 3 comments

Gazebo 8 with ROS lunar.
Running gazebo.launch of bluerov_ffg

[ INFO] [1508888507.186540871]: Loading freefloating_fluid plugin
[FATAL] [1508888507.186746160]: You must call ros::init() before creating the first NodeHandle

Hi,

I am still using Gazebo7 on Xenial / Kinetic and cannot reproduce your error.

This error means that the ROS API is not loaded prior to the plugins.
You should see more or less this sequence:

process[gazebo-2]: started with pid [6227]
process[gazebo_gui-3]: started with pid [6232]
process[brov/spawner-4]: started with pid [6237]
process[brov/robot_state_publisher-5]: started with pid [6238]
process[brov/thrusters/joint_state_publisher-6]: started with pid [6239]
process[terrain_spawner-7]: started with pid [6240]
[ INFO] [1508920236.079088013]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1508920236.079939686]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
SpawnModel script started
SpawnModel script started
[INFO] [1508920236.559547, 0.000000]: Loading model XML from ros parameter
[INFO] [1508920236.562410, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
[ INFO] [1508920236.664187741]: Loading freefloating_fluid plugin
[ INFO] [1508920236.669392168]: Loaded freefloating_fluid plugin.

The important line is the [ INFO] [1508920236.079088013]: Finished loading Gazebo ROS API Plugin as it shows Gazebo has loaded its ROS API and has executed ros::init.

I'll give it a try in a virtual machine.

I also get errors when trying to use Gazebo8 (with Kinetic).
After some reading it appears that using Gazebo8 for ROS is not recommended.

According to this page, you have to install ros-lunar-gazebo8-ros-pkgs by hand if you want to stick with Gazebo8. However I recommend using the LTS versions (at the moment: Xenial / Kinetic / Gazebo 7).

Tys @oKermorgant, I'll take a look and reply my test with gazebo ros pkg.
This plugin is awesome, congrats !