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

Python error when try Autonomy pack on RosHydro

asked 2016-12-07 22:24:44 -0500

science00000 gravatar image

updated 2016-12-08 01:28:53 -0500

gvdhoorn gravatar image

I run a launch file for irobot-create2 ( ) then faced issue, I think that is related to python.

My setup:
- Ubuntu LS12.04
- Ros Hydro
- irobot create2

First I run without ca_description/launch/create_2.launch
$ roslaunch ca_driver create_2.launch [desc:=false] [publish_tf:=true]
--> it start communication with irobot.

Next I run launch file ca_description/launch/create_2.launch
--> OSError: [Errno 8] Exec format error

Traceback (most recent call last):
  File "/opt/ros/hydro/lib/python2.7/dist-packages/roslaunch/", line 279, in main
  File "/opt/ros/hydro/lib/python2.7/dist-packages/roslaunch/", line 257, in start
  File "/opt/ros/hydro/lib/python2.7/dist-packages/roslaunch/", line 206, in _start_infrastructure
  File "/opt/ros/hydro/lib/python2.7/dist-packages/roslaunch/", line 121, in _load_config
    self.config = roslaunch.config.load_config_default(self.roslaunch_files, self.port, verbose=self.verbose)
  File "/opt/ros/hydro/lib/python2.7/dist-packages/roslaunch/", line 428, in load_config_default
    loader.load(f, config, verbose=verbose)
  File "/opt/ros/hydro/lib/python2.7/dist-packages/roslaunch/", line 698, in load
    self._load_launch(launch, ros_config, is_core=core, filename=filename, argv=argv, verbose=verbose)
  File "/opt/ros/hydro/lib/python2.7/dist-packages/roslaunch/", line 670, in _load_launch
    self._recurse_load(ros_config, launch.childNodes, self.root_context, None, is_core, verbose)
  File "/opt/ros/hydro/lib/python2.7/dist-packages/roslaunch/", line 614, in _recurse_load
    self._param_tag(tag, context, ros_config, verbose=verbose)
  File "/opt/ros/hydro/lib/python2.7/dist-packages/roslaunch/", line 95, in call
    return f(*args, **kwds)
  File "/opt/ros/hydro/lib/python2.7/dist-packages/roslaunch/", line 240, in _param_tag
    value = self.param_value(verbose, name, ptype, *vals)
  File "/opt/ros/hydro/lib/python2.7/dist-packages/roslaunch/", line 466, in param_value
    p = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE)
  File "/usr/lib/python2.7/", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/", line 1249, in _execute_child
    raise child_exception
OSError: [Errno 8] Exec format error
edit retag flag offensive close merge delete


This seems like there are problems with access rights or the shebang. crate_2.launch just starts one node, robot_state_publisher and it uses xacro to evaluate the urdf. Is xacro installed? From source? Did you copy something over using a windows PC? Did you change the launchfile?

mgruhler gravatar image mgruhler  ( 2016-12-08 01:27:52 -0500 )edit

I try to check xacro file
rosrun xacro ~/dev/catkin_ws/src/create_autonomy/ca_description/urdf/create_2.urdf.xacro
output err as below :

 xacro.XacroException: Some parameters were not set for macro xacro:create_base

science00000 gravatar image science00000  ( 2016-12-08 11:02:04 -0500 )edit

In file create_base.urdf.xacro
the parameter wheel_separation not set to specific value
I try set one but have another err

xacro.XacroException: Invalid parameter "wheel_separation" while expanding macro "xacro:create_base"

science00000 gravatar image science00000  ( 2016-12-08 11:09:13 -0500 )edit

Hi mig I have modified launch file for debug then have error --> OSError: [Errno 8] Exec format error
thanks you :)

science00000 gravatar image science00000  ( 2016-12-09 10:06:22 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-12-08 14:23:32 -0500

jacobperron gravatar image

updated 2016-12-08 14:24:01 -0500

Maybe it has something to do with macro default parameters added in Indigo (not in Hydro)? I guess xacro would not be happy with this line in particular. You could try removing all the parameters that have a default and just hardcode the values in create_base_gazebo.urdf.xacro.

edit flag offensive delete link more


jacobperronYour point is correct :)
I have updated as below

science00000 gravatar image science00000  ( 2016-12-09 10:01:04 -0500 )edit

<xacro:property name="diffdrive_update_rate" value="40"/>
<xacro:property name="wheel_separation" value="235"/>
<xacro:property name="mass_kg" value="3.5"/>
  <xacro:macro name="create_base" params="wheel_separation base_diameter *mesh">

science00000 gravatar image science00000  ( 2016-12-09 10:02:23 -0500 )edit

Question Tools



Asked: 2016-12-07 22:24:44 -0500

Seen: 226 times

Last updated: Dec 08 '16