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

Can not launch the file to load my world and Turtlebot models

asked 2022-05-20 23:43:57 -0500

bian.z gravatar image

updated 2022-05-25 02:31:47 -0500

ljaniec gravatar image

When I launch my file with the command: roslaunch TestWorld1.launch the error is shown as:

IOError: [Errno 2] No such file or directory: '/opt/ros/indigo/share/turtlebot_description/robots/(arg base)_(arg stacks)_(arg 3d_sensor).urdf.xacro'
while processing /opt/ros/indigo/share/turtlebot_gazebo/launch/includes/kobuki.launch.xml:
Invalid <param> tag: Cannot load command parameter [robot_description]: command [/opt/ros/indigo/share/xacro/xacro.py '/opt/ros/indigo/share/turtlebot_description/robots/(arg base)_(arg stacks)_(arg 3d_sensor).urdf.xacro'] returned with code [1].

Param xml is <param command="$(arg urdf_file)" name="robot_description"/>. The traceback for the exception was written to the log file

Here is my launch file:

<launch>  

  <arg name="base"      value="$(optenv TURTLEBOT_BASE kobuki)"/>
  <arg name="battery"   value="$(optenv TURTLEBOT_BATTERY /proc/acpi/battery/BAT0)"/>
  <arg name="gui" default="true"/>
  <arg name="stacks"    value="$(optenv TURTLEBOT_STACKS hexagons)"/>
  <arg name="3d_sensor" value="$(optenv TURTLEBOT_3D_SENSOR kinect)"/>

  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="home/ziyubian/turtlebot_custom_gazebo_worlds/TestWorld1.world"/>
    <arg name="paused" default="false"/>
    <arg name="use_sim_time" value="true"/>
    <arg name="debug" value="false"/>
    <arg name="gui" value="$(arg gui)" />
  </include>


  <include file="$(find turtlebot_gazebo)/launch/includes/$(arg base).launch.xml">
    <arg name="base" value="(arg base)"/>
    <arg name="stacks" value="(arg stacks)"/>
    <arg name="3d_sensor" value="(arg 3d_sensor)"/>
  </include>


  <node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher">
    <param name="publish_frequency" type="double" value="30.0" />
  </node>

</launch>

Does anybody know how can I fix it? Thanks in advance!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-05-25 02:28:43 -0500

Robo_guy gravatar image

Hello @bian.z, you have not mentioned this line in the launch file - <param name="robot_description" command="rosrun xacro xacro --inorder --(location of your urdf file). The error could be because of this. If not due to the above reason, then you may have missed this - xmlns:xacro="http://www.ros.org/wiki/xacro" in your xacro files or some packages must be missing which need to be installed.

If none of the above is working then there is some other issue in your xacro files, please share the xacro file so that we can find the bug and solve your issue, thank you.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2022-05-20 23:43:57 -0500

Seen: 305 times

Last updated: May 25 '22