SNRLab / SlicerROSIntegrationTraining

Create a plugin software to connect ROS and Slicer by OpenIGTLink
1 stars 0 forks source link

Test gazebo #14

Closed ayamada0614 closed 11 years ago

ayamada0614 commented 11 years ago

Please try gazebo example as follows to understand what we can do on the simulator.

http://www.ros.org/wiki/simulator_gazebo/Tutorials/CreatingASpinningTopInGazebo

jamesmith commented 11 years ago

I tried and completed gazebo example. But I may not understand.

jamesmith commented 11 years ago

I was not able to understand how to setup resource paths for Gazebo Therefor I was not able to execute the following command

cp dreidel.stl `rospack find gazebo_worlds`/Media/models/

I executed command instead

cp dreidel.stl /opt/ros/fuerte/stacks/simulator_gazebo/gazebo_worlds/Media/models/

Is it OK?

jamesmith commented 11 years ago

Fatal problem. gazebo GUI process is often died just after start.

I show a message just before error. Last two lines are error message.

Msg Waiting for master.[ INFO] [1355381924.351942549]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
Msg Waiting for master
Msg Connected to gazebo master @ http://localhost:11345
[ INFO] [1355381924.495038402]: joint trajectory plugin missing <updateRate>, defaults to 0.0 (as fast as possible)

Msg Connected to gazebo master @ http://localhost:11345
[ INFO] [1355381925.712081920, 0.069000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1355381925.743041445, 1.022000000]: Starting to spin physics dynamic reconfigure node...
LightListWidget::OnLightMsg
/opt/ros/fuerte/stacks/simulator_gazebo/gazebo/scripts/gui: 2 行: 10373 Segmentation fault      (コアダンプ) `rospack find gazebo`/gazebo/bin/gzclient -g `rospack find gazebo`/lib/libgazebo_ros_paths_plugin.so
[gazebo_gui-3] process has died [pid 10370, exit code 139, cmd /opt/ros/fuerte/stacks/simulator_gazebo/gazebo/scripts/gui __name:=gazebo_gui __log:=/home/jamesmith/.ros/log/8891bf06-44f2-11e2-8f77-d8d38579e81d/gazebo_gui-3.log].
log file: /home/jamesmith/.ros/log/8891bf06-44f2-11e2-8f77-d8d38579e81d/gazebo_gui-3*.log
jamesmith commented 11 years ago

I can executed following command.

cp dreidel.stl `rospack find gazebo_worlds`/Media/models/

I mistook `(back quote) for '(single quote)

jamesmith commented 11 years ago

At first, I didn't understand a way of execute rosservive call .... Should I execute it in another terminal ?

ayamada0614 commented 11 years ago

Hi, Yes, you can execute the rosservice command you mentioned and another commands from other terminals.

jamesmith commented 11 years ago

I ignore "Gazebo GUI crashes" this time. Because Gazebo GUI crashes in the official VirtualBox virtual image.

ayamada0614 commented 11 years ago

Hi jamesmith, Would you tell me the error messages you got when you executed Gazebo?

jamesmith commented 11 years ago

I tell you the error message when I execute Gazebo. Both official VM and My setup environment are the same error messages.

The follows are messages of official VM.

viki@ROS:~$ roslaunch gazebo_worlds empty_world.launch 
... logging to /home/viki/.ros/log/e96b001e-47f2-11e2-9fbb-0800273e597f/roslaunch-ROS-1904.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://localhost:49366/

SUMMARY
========

PARAMETERS
 * /rosdistro
 * /rosversion
 * /use_sim_time

NODES
  /
    gazebo (gazebo/gazebo)
    gazebo_gui (gazebo/gui)

auto-starting new master
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[master]: started with pid [1924]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to e96b001e-47f2-11e2-9fbb-0800273e597f
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[rosout-1]: started with pid [1937]
started core service [/rosout]
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[gazebo-2]: started with pid [1940]
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[gazebo_gui-3]: started with pid [1954]
Gazebo multi-robot simulator, version 1.0.2
Copyright (C) 2011 Nate Koenig, John Hsu, Andrew Howard, and contributors.
Released under the Apache 2 License.
http://gazebosim.org

Gazebo multi-robot simulator, version 1.0.2
Copyright (C) 2011 Nate Koenig, John Hsu, Andrew Howard, and contributors.
Released under the Apache 2 License.
http://gazebosim.org

Msg Waiting for master.[ INFO] [1355711948.631691479]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
Msg Waiting for master
Msg Connected to gazebo master @ http://localhost:11345
OpenGL Warning: Failed to connect to host. Make sure 3D acceleration is enabled for this VM.

Msg Connected to gazebo master @ http://localhost:11345
OpenGL Warning: Failed to connect to host. Make sure 3D acceleration is enabled for this VM.
[ INFO] [1355711955.089203548, 0.150000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1355711956.155182968, 2.826000000]: Starting to spin physics dynamic reconfigure node...
/opt/ros/fuerte/stacks/simulator_gazebo/gazebo/scripts/gui: line 2:  1961 Segmentation fault      (core dumped) `rospack find gazebo`/gazebo/bin/gzclient -g `rospack find gazebo`/lib/libgazebo_ros_paths_plugin.so
[gazebo_gui-3] process has died [pid 1954, exit code 139, cmd /opt/ros/fuerte/stacks/simulator_gazebo/gazebo/scripts/gui __name:=gazebo_gui __log:=/home/viki/.ros/log/e96b001e-47f2-11e2-9fbb-0800273e597f/gazebo_gui-3.log].
log file: /home/viki/.ros/log/e96b001e-47f2-11e2-9fbb-0800273e597f/gazebo_gui-3*.log
ayamada0614 commented 11 years ago

Hi jamesmith, Did you make sure if you executed your VM with 3D acceleration?

ayamada0614 commented 11 years ago

This error might be caused by your 3D acceleration setting. Once 3D acceleration is enabled, I hope you can execute Gazebo in your VM.

ayamada0614 commented 11 years ago

I made sure I could execute Gazebo GUI in my VM on VirtulalBox. My environments are as follows:

Host OS: OS X 10.7.4 Guest OS: Ubuntu Linux 12.0.4 LTS 32bit installed from iso image without ROS VM: Oracle VirtualBox 4.2.4 r81684

jamesmith commented 11 years ago

My environments

  1. VirtualBox from iso Host OS: Windows7 pro 32bit Guest OS: Ubuntu Linux 12.0.4 LTS 32bit installed from iso image. VM: Oracle VirtualBox 4.2.4 r81684
  2. VirtualBox from iso (ROS official) Host OS: Windows7 pro 32bit Guest OS: ROS official image. VM: Oracle VirtualBox 4.2.4 r81684
  3. Wubi install Host OS: Winsows7 pro Guest OS: Ubuntu Linux 12.0.4 LTS 32bit installed from iso image.
  4. VM Player Host OS: Windows7 pro 32bit Guest OS: Ubuntu Linux 12.0.4 LTS 32bit installed from iso image. VM: VMware Player 5.0.1 build-894247
jamesmith commented 11 years ago

Environments 1 & 2 (VirtualBox)

3D acceleration is disabled from this Environments. But, I cannot log in when I set 3D acceleration. VM became forced termination.

Environment 3 (Wubi)

This environment has the error message that I wrote first. Gazebo GUI process is often died just after start.

Environment 4 (VMware Player)

3D acceleration is enabled. and I made sure I could execute Gazebo GUI. But, GUI viewer and ubuntu toolbar is blackout. Probably 3D acceleration does not function normally

It does not make sense...

ayamada0614 commented 11 years ago

I made sure that ROS and Gazebo GUI could work well in my environment as follows:

*VirtualBox Host OS: Windows7 pro 64bit Guest OS: Ubuntu Linux 12.0.4 LTS 32bit installed from iso image without ROS. VM: Oracle VirtualBox 4.2.4 r81684 with 3D acceleration enabled

jamesmith commented 11 years ago

My workstation is HP Compaq 8000 Elite CMT Business. This workstation graphic chip is Intel 4 Series Express Chipset Family ...

jamesmith commented 11 years ago

I could enable to 3D acceleration from Environment 1. I succeeded by installing Ubuntu after I enabled 3D acceleration. I failed until now because I enable 3D acceleration after having installed Ubuntu.