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

spawn_model: error turtlebot3

asked 2023-05-01 19:55:25 -0600


I have been trying to launch turtlebot3 in gazebo and I have been recieving the following error. Gazebo launches the following world without turtlebot

[spawn_urdf-4] process has died [pid 1665811, exit code 2, cmd /opt/ros/noetic/lib/gazebo_ros/spawn_model -x 2 -y 0 -z 0 -roll 0 -pitch 0 -yaw 0 -urdf -model turtlebot3_burger -param robot_description __name:=spawn_urdf __log:=/home/naveen/.ros/log/55d4a25a-e87e-11ed-9733-5bf4ee681859/spawn_urdf-4.log].

The following is the log message I recieved: spawn_model: error: argument -y: invalid float value: 'aw'

killall gzserver && killall gzclient I tried these commands but the issue still exists.

It would be really helpful if anyone can solve the issue.

This is the .launch file

<launch> <arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle, waffle_pi]"/> <arg name="record" default="false"/> <arg name="x" default="2"/> <arg name="y" default="0"/> <arg name="z" default="0"/> <arg name="roll" default="0"/> <arg name="pitch" default="0"/> <arg name="yaw" default="0"/>

    launch-prefix="gnome-terminal --command"

<include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value ="$(find turtlebot_rrt)/world/"/>
    <arg name="paused" value="false"/>
    <arg name="use_sim_time" value="true"/>
<arg name="gui" value="true"/>
<arg name="headless" value="false"/>
<arg name="debug" value="false"/>

<param name="robot_description" command="$(find xacro)/xacro --inorder $(find turtlebot3_description)/urdf/turtlebot3_$(arg model).urdf.xacro" />
<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-x $(arg x) -y $(arg y) -z $(arg z) -roll $(arg roll) -pitch $(arg pitch) -yaw $(arg yaw) -urdf -model turtlebot3_$(arg model) -param robot_description"/>


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2023-05-06 12:58:57 -0600

Mike Scheutzow gravatar image

updated 2023-05-06 13:00:00 -0600

You can see what the valid options are for spawn_model using this command:

rosrun gazebo_ros spawn_model -h

I don't have noetic available to confirm them right now, but in melodic the correct options for orientation are: -R, -P and -Y (all upper case.)

edit flag offensive delete link more


Thanks for the response. It works! gravatar image  ( 2023-05-06 21:11:44 -0600 )edit

Question Tools

1 follower


Asked: 2023-05-01 19:55:25 -0600

Seen: 206 times

Last updated: May 06 '23