0
$\begingroup$

Rosanswers logo

Dear all,

I tried to run the KUKA youbot simulation in Gazebo, with code that worked just fine under Electric on Ubuntu 11.04. But now I get this very meaningful error 'invalid arguments' without further indication where to look. Gazebo is not coming up. The mentioned log files are empty or don't exist. The output shows also an attribute error, which Gazebo gives also when launching the PR2 or an empty world (which didn't pose a problem for those simulations). If I delete the remap statements out of the launch file, I get a new error (see below), although the remap statement looks fine.

Anyone any idea? Did the syntax change?

Thanks in advance!

Nick

The launch script:

(if the launch script is not shown properly, you can find the full version here: https://github.com/youbot/youbot-ros-pkg/tree/master/youbot_common/youbot_description/launch/youbot_publisher.launch )

<code>
<launch>
        <param name="/use_sim_time" value="true" />
        <node name="gazebo" pkg="gazebo" type="gazebo" args="$(find gazebo_worlds)/worlds/empty.world" respawn="false" output="screen">
                <env name="GAZEBO_RESOURCE_PATH" value="$(find youbot_description):$(find gazebo_worlds):$(find gazebo)/gazebo/share/gazebo" />
                <remap from="base_controller/command" to="cmd_vel"/>
                <remap from="scan_front" to="base_scan"/>
                <remap from="/base_odometry/odom" to="/odom" />
        </node>

        <!-- send youbot urdf to param server -->
        <param name="robot_description" command="$(find xacro)/xacro.py '$(find youbot_description)/robots/youbot.urdf.xacro'"/>

        <!-- push robot_description to factory and spawn robot in gazebo -->
        <node name="youbot_gazebo_model" pkg="gazebo" type="spawn_model" args="-urdf -param robot_description -model youBot -x 0.0 -y 0.0 -z 0.1" respawn="false" output="screen" />
        
        <include file="$(find youbot_description)/launch/control/youbot_base_control.launch" />
        <include file="$(find youbot_description)/launch/control/youbot_arm_control.launch" />

</launch>
</code>

the output 
----------------
... logging to /home/u0065688/.ros/log/3df9c36e-cc1e-11e1-a6e5-0024e8dfc1df/roslaunch-pma-09-053-14267.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:54986/

SUMMARY


PARAMETERS
 * /arm_1/arm_controller/gains/arm_joint_1/d
 * /arm_1/arm_controller/gains/arm_joint_1/i
 * /arm_1/arm_controller/gains/arm_joint_1/p
 * /arm_1/arm_controller/gains/arm_joint_2/d
 * /arm_1/arm_controller/gains/arm_joint_2/i
 * /arm_1/arm_controller/gains/arm_joint_2/p
 * /arm_1/arm_controller/gains/arm_joint_3/d
 * /arm_1/arm_controller/gains/arm_joint_3/i
 * /arm_1/arm_controller/gains/arm_joint_3/p
 * /arm_1/arm_controller/gains/arm_joint_4/d
 * /arm_1/arm_controller/gains/arm_joint_4/i
 * /arm_1/arm_controller/gains/arm_joint_4/p
 * /arm_1/arm_controller/gains/arm_joint_5/d
 * /arm_1/arm_controller/gains/arm_joint_5/i
 * /arm_1/arm_controller/gains/arm_joint_5/p
 * /arm_1/arm_controller/joints
 * /arm_1/arm_controller/type
 * /base_controller/caster_joint_bl/position_controller/d
 * /base_controller/caster_joint_bl/position_controller/i
 * /base_controller/caster_joint_bl/position_controller/i_clamp
 * /base_controller/caster_joint_bl/position_controller/p
 * /base_controller/caster_joint_bl/velocity_controller/d
 * /base_controller/caster_joint_bl/velocity_controller/i
 * /base_controller/caster_joint_bl/velocity_controller/i_clamp
 * /base_controller/caster_joint_bl/velocity_controller/p
 * /base_controller/caster_joint_br/position_controller/d
 * /base_controller/caster_joint_br/position_controller/i
 * /base_controller/caster_joint_br/position_controller/i_clamp
 * /base_controller/caster_joint_br/position_controller/p
 * /base_controller/caster_joint_br/velocity_controller/d
 * /base_controller/caster_joint_br/velocity_controller/i
 * /base_controller/caster_joint_br/velocity_controller/i_clamp
 * /base_controller/caster_joint_br/velocity_controller/p
 * /base_controller/caster_joint_fl/position_controller/d
 * /base_controller/caster_joint_fl/position_controller/i
 * /base_controller/caster_joint_fl/position_controller/i_clamp
 * /base_controller/caster_joint_fl/position_controller/p
 * /base_controller/caster_joint_fl/velocity_controller/d
 * /base_controller/caster_joint_fl/velocity_controller/i
 * /base_controller/caster_joint_fl/velocity_controller/i_clamp
 * /base_controller/caster_joint_fl/velocity_controller/p
 * /base_controller/caster_joint_fr/position_controller/d
 * /base_controller/caster_joint_fr/position_controller/i
 * /base_controller/caster_joint_fr/position_controller/i_clamp
 * /base_controller/caster_joint_fr/position_controller/p
 * /base_controller/caster_joint_fr/velocity_controller/d
 * /base_controller/caster_joint_fr/velocity_controller/i
 * /base_controller/caster_joint_fr/velocity_controller/i_clamp
 * /base_controller/caster_joint_fr/velocity_controller/p
 * /base_controller/caster_names
 * /base_controller/caster_position_pid_gains/d
 * /base_controller/caster_position_pid_gains/i
 * /base_controller/caster_position_pid_gains/i_clamp
 * /base_controller/caster_position_pid_gains/p
 * /base_controller/caster_velocity_filter/name
 * /base_controller/caster_velocity_filter/params/a
 * /base_controller/caster_velocity_filter/params/b
 * /base_controller/caster_velocity_filter/type
 * /base_controller/caster_velocity_pid_gains/d
 * /base_controller/caster_velocity_pid_gains/i
 * /base_controller/caster_velocity_pid_gains/i_clamp
 * /base_controller/caster_velocity_pid_gains/p
 * /base_controller/max_rotational_acceleration
 * /base_controller/max_rotational_velocity
 * /base_controller/max_translational_acceleration/x
 * /base_controller/max_translational_acceleration/y
 * /base_controller/max_translational_velocity
 * /base_controller/publish_tf
 * /base_controller/state_publish_rate
 * /base_controller/timeout
 * /base_controller/type
 * /base_controller/wheel_joint_bl/d
 * /base_controller/wheel_joint_bl/i
 * /base_controller/wheel_joint_bl/i_clamp
 * /base_controller/wheel_joint_bl/p
 * /base_controller/wheel_joint_br/d
 * /base_controller/wheel_joint_br/i
 * /base_controller/wheel_joint_br/i_clamp
 * /base_controller/wheel_joint_br/p
 * /base_controller/wheel_joint_fl/d
 * /base_controller/wheel_joint_fl/i
 * /base_controller/wheel_joint_fl/i_clamp
 * /base_controller/wheel_joint_fl/p
 * /base_controller/wheel_joint_fr/d
 * /base_controller/wheel_joint_fr/i
 * /base_controller/wheel_joint_fr/i_clamp
 * /base_controller/wheel_joint_fr/p
 * /base_controller/wheel_pid_gains/d
 * /base_controller/wheel_pid_gains/i
 * /base_controller/wheel_pid_gains/i_clamp
 * /base_controller/wheel_pid_gains/p
 * /base_odometry/base_footprint_frame
 * /base_odometry/base_link_frame
 * /base_odometry/caster_calibration_multiplier
 * /base_odometry/caster_names
 * /base_odometry/cov_xrotation
 * /base_odometry/cov_xy
 * /base_odometry/cov_yrotation
 * /base_odometry/ils_max_iterations
 * /base_odometry/odom_frame
 * /base_odometry/odom_publish_rate
 * /base_odometry/odometer_publish_rate
 * /base_odometry/publish_tf
 * /base_odometry/rotation_stddev
 * /base_odometry/state_publish_rate
 * /base_odometry/type
 * /base_odometry/verbose
 * /base_odometry/wheel_radius_multiplier
 * /base_odometry/x_stddev
 * /base_odometry/y_stddev
 * /pr2_controller_manager/joint_state_publish_rate
 * /pr2_controller_manager/mechanism_statistics_publish_rate
 * /publish_frequency
 * /robot_description
 * /robot_state_publisher/publish_frequency
 * /robot_state_publisher/tf_prefix
 * /rosdistro
 * /rosversion
 * /use_sim_time

NODES
  /
    arm_controller_spawner (pr2_controller_manager/spawner)
    base_controllers_spawner (pr2_controller_manager/spawner)
    gazebo (gazebo/gazebo)
    joint_translator (itasc_youbot/joint_translator)
    pr2_mechanism_diagnostics (pr2_mechanism_diagnostics/pr2_mechanism_diagnostics)
    robot_state_publisher (robot_state_publisher/state_publisher)
    velocity_translator (itasc_youbot/velocity_translator)
    youbot_gazebo_model (gazebo/spawn_model)

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 [14286]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 3df9c36e-cc1e-11e1-a6e5-0024e8dfc1df
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 [14299]
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 [14313]
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[youbot_gazebo_model-3]: started with pid [14324]
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

**Error. Invalid arguments**
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
[gazebo-2] process has died [pid 14313, exit code 255, cmd /opt/ros/fuerte/stacks/simulator_gazebo/gazebo/scripts/gazebo /opt/ros/fuerte/stacks/simulator_gazebo/gazebo_worlds/worlds/empty.world base_controller/command:=cmd_vel scan_front:=base_scan /base_odometry/odom:=/odom __name:=gazebo __log:=/home/u0065688/.ros/log/3df9c36e-cc1e-11e1-a6e5-0024e8dfc1df/gazebo-2.log].
log file: /home/u0065688/.ros/log/3df9c36e-cc1e-11e1-a6e5-0024e8dfc1df/gazebo-2*.log
process[robot_state_publisher-4]: started with pid [14325]
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[pr2_mechanism_diagnostics-5]: started with pid [14346]
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[base_controllers_spawner-6]: started with pid [14365]
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[arm_controller_spawner-7]: started with pid [14366]
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[joint_translator-8]: started with pid [14367]
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[velocity_translator-9]: started with pid [14381]
loading model xml from ros parameter


error without remap statements
------------------------------
waiting for service spawn_urdf_model
[ WARN] [1342106748.009969198]: multiple inconsistent <turnGravityOff> exists due to fixed joint reduction, overwriting previous value [true] with [false].
Warning [parser.cc:332] Gazebo SDF has no gazebo element
Warning [parser.cc:271] parse as sdf version 1.0 failed, trying to parse as old deprecated format
Warning [parser.cc:277] parse as old deprecated world file failed, trying old model format.
[ INFO] [1342106749.288581927, 0.001000000]: Laser plugin missing <hokuyoMinIntensity>, defaults to 101
[ INFO] [1342106749.289155673, 0.001000000]: INFO: gazebo_ros_laser plugin should set minimum intensity to 101.000000 due to cutoff in hokuyo filters.
Dbg plugin model name: youBot
[ INFO] [1342106749.307460931, 0.001000000]: starting gazebo_ros_controller_manager plugin in ns: /
[ INFO] [1342106749.309969773, 0.001000000]: Callback thread id=0x7fa3787a39e0
Dbg plugin model name: youBot
spawn status:  SpawnModel: successfully spawned model
[ INFO] [1342106749.722135591, 0.049000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
Unhandled exception in thread started by [ INFO] [1342106749.784878201, 0.110000000]: Starting to spin physics dynamic reconfigure node...

sys.excepthook is missing
lost sys.stderr
[youbot_gazebo_model-2] process has finished cleanly

Originally posted by NickVT on ROS Answers with karma: 51 on 2012-07-12

Post score: 1


Original comments

Comment by NickVT on 2012-07-12:
I'm able to spawn the youbot model on it's own btw, using rosrun gazebo spawn_model -file /home/u0065688/src/svn/robotics-ros/packages/youbot-ros-pkg/youbot_common/youbot_description/robots/youbot.urdf -urdf -z 0.1 -model youBot

Comment by NickVT on 2012-07-12:
My question relates (I think) to the one posted on the ROS-users mailinglist (unanswered) :"Remap does not work on gazebo_ros_prosilica" on 24/6/2012

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Ticketed.

Yes, it's a problem with Fuerte that the gazebo node is no longer a ros node. The command line arguments needs to be passed in to underlying gazebo executable and passed through to the ros plugin that calls ros::init. I'll working on fixing this so namespace remapping works.

As a side note, I notice you are setting GAZEBO_RESOURCE_PATH in your launch file for the gazebo node; you can avoid doing so by updating manifest.xml in the youbot_description package to make sure it includes the following items:

<depend package="gazebo" />
<export>
  <gazebo gazebo_media_path="${prefix}/gazebo/share/gazebo-1.0.2" />
</export>

Originally posted by hsu with karma: 5780 on 2012-07-18

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.