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

roslaunch, gazebo wait option?

asked 2013-03-04 21:24:03 -0500

davinci gravatar image

updated 2013-03-04 21:26:03 -0500

I am running a simulation with gazebo with several nodes that interact with it. Unfortunatly gazebo dies every round every 4 try or something. This is probably due that gazebo isn't fully loaded yet but the other nodes already try to interact. Is it possible to wait in a launch file? I know that you can check for spawning of a model in C++ but I don't want to change the code of other peoples nodes.

For instance:

[INFO] [WallTime: 1362474942.941701] [0.000000] waiting for service /gazebo/spawn_gazebo_model
[ INFO] [1362474942.959366049]: Starting ArSinglePublisher
[ INFO] [1362474942.960436786]:     Publish transforms: 1
[ INFO] [1362474942.961100138]:     Publish visual markers: 1
[ INFO] [1362474942.961786398]:     Threshold: 100
[ INFO] [1362474942.962510092]:     Marker Width: 80.0
[ INFO] [1362474942.963164854]:     Reverse Transform: 0
[ INFO] [1362474942.963834981]:     Marker frame: ar_marker
[ INFO] [1362474942.964532556]:     Use history: 1
[ INFO] [1362474942.968002829]:     Marker Center: (0.0,0.0)
[ INFO] [1362474942.968078677]: Subscribing to info topic
Service call failed: unable to connect to service: [Errno 104] Connection reset by peer
Service call failed: unable to connect to service: [Errno 104] Connection reset by peer
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[rviz_marker-10]: started with pid [3694]
Service call failed: transport error completing service call: unable to receive data from sender, check sender's logs for details
Aborted (core dumped)
[gazebo-2] process has died [pid 3518, exit code 134, cmd /home/lm/fuerte_workspace/simulator_gazebo/gazebo/scripts/gazebo /home/lm/fuerte_workspace/sandbox/ar_joint_controller/model/empty_throttled.world __name:=gazebo __log:=/home/lm/.ros/log/3f24e8ca-8575-11e2-8c2d-00216a4e286a/gazebo-2.log].
log file: /home/lm/.ros/log/3f24e8ca-8575-11e2-8c2d-00216a4e286a/gazebo-2*.log

Or:

[INFO] [WallTime: 1362475473.343128] [0.000000] waiting for service /gazebo/spawn_gazebo_model
[ INFO] [1362475473.566625127]: joint trajectory plugin missing <updateRate>, defaults to 0.0 (as fast as possible)
gzserver: /usr/include/boost/smart_ptr/shared_ptr.hpp:418: T* boost::shared_ptr<T>::operator->() const [with T = gazebo::transport::Publisher]: Assertion `px != 0' failed.
Service call failed: unable to connect to service: [Errno 104] Connection reset by peer
Service call failed: transport error completing service call: unable to receive data from sender, check sender's logs for details
Aborted (core dumped)
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2014-04-24 02:36:43 -0500

koenlek gravatar image

I have figured out a way to do it! I built a script that nicely enables you to delay parts of your launch file. See my answer here, which includes clear instructions and the script: http://answers.ros.org/question/51474...

edit flag offensive delete link more
0

answered 2013-03-20 17:42:04 -0500

130s gravatar image

Not a final solution to the problem essentially, but in roslaunch plugin of rqt, [rqt_launch], you can run the nodes defined in .launch file 1-by-1 (it's under development so there are still many other issues that may prevent you from doing your task though). At least you can diagnose what's happening by separately start & stop nodes.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-03-04 21:24:03 -0500

Seen: 2,672 times

Last updated: Apr 24 '14