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

Indigo fails to load clearpath husky in gazebo [closed]

asked 2014-09-15 15:59:24 -0600

l0g1x gravatar image

So im trying to migrate over from hydro to indigo, and along with that I am trying to move over my custom simulator packages. Im getting alot fatal errors with trying to run my model with gazebo 2.2 on indigo. But then i realized that the stock Clearpath Husky model that comes from the model database doesnt work either..

Here is the error when I click on the Clearpath model (after gazebo is already open):

[FATAL] [1410814234.648936211]: You must call ros::init() before creating the first NodeHandle
[FATAL] [1410814234.648982364]: BREAKPOINT HIT
file = /tmp/buildd/ros-indigo-roscpp-1.11.9-0trusty-20140904-2000/src/libros/node_handle.cpp
line=151

Not sure what to do, and dont really want to resort to installing hydro from source since i already updated to 14.04 ubuntu.. Anybody having a closing on this?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by l0g1x
close date 2015-04-02 21:59:05.838572

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-09-29 12:12:10 -0600

l0g1x gravatar image

Turns out that the real problem is loading a model from within gazebo (i.e Insert-->Clearpath Husky) that contains a ROS plugin inside of the model.sdf in the ~/.gazebo/models/(your model). Since after the release of Hydro, Gazebo and ROS are installed as two separate things from each other. Therefore, If you try to "insert" a model when gazebo is already opened, it will give you the error that i received above because you are not running the main component that links gazebo and ROS (since they are independent of eachtoher), "rosGazeboApi".

From my basic understanding and figuring this out, you need to launch your gazebo model from within a ROS launch file using the "spawn_model" node and passing the description of your gazebo model (the .sdf file) as a parameter to spawn_model, which is what solves my problem, IN HYDRO, but since it is the same error, i think it should work in indigo as well. This fix should work across all platforms.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-09-15 15:59:24 -0600

Seen: 354 times

Last updated: Sep 29 '14