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

Unable to spawn a p3at in gazebo

asked 2016-09-13 09:36:33 -0600

updated 2016-09-14 06:53:17 -0600

Using; 1. Ubuntu 14.04 LTS/ROS indigo/ Gazebo/p3at as robot

I wish to spawn my p3at into gazebosim. my launch file is following;

<launch>

<!--##########################################################################-->
<!--Launching gazebo world --> 
<arg name="world"  default="my_world"/>
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="use_sim_time" value="true"/>
<arg name="debug" value="false"/>
<arg name="gui" value="true" />
<arg name="world_name" value="$(find scca)/worlds/$(arg world).world"/>
</include>
<!--##########################################################################-->
<!-- Spawn a robot into Gazebo -->
<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-file $(find p3at_description)/urdf/p3at1.urdf -urdf -z 1 -model P3AT" />
<!--##########################################################################-->

<!--##########################################################################-->
</launch>

it is not throwing any error message, but unable to spawn p3at in gazebo.

EDIT-1:

If i run urdf separately i.e. scca.launch as;

<launch>

<!--##########################################################################-->
<!--Launching gazebo world --> 
<arg name="world"  default="my_world"/>
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="use_sim_time" value="true"/>
<arg name="debug" value="false"/>
<arg name="gui" value="true" />
<arg name="world_name" value="$(find scca)/worlds/$(arg world).world"/>
</include>
</launch>

and urdf file as;

rosrun gazebo_ros spawn_model -file `rospack find p3at_description`/urdf/p3at1.urdf -urdf -z 1 -model p3at

it gives a success message, as;

spawn_model script started
[INFO] [WallTime: 1473777604.025414] [0.000000] Loading model xml from file
[INFO] [WallTime: 1473777604.025924] [0.000000] Waiting for service /gazebo/spawn_urdf_model
[INFO] [WallTime: 1473777604.028502] [0.000000] Calling service /gazebo/spawn_urdf_model
[INFO] [WallTime: 1473777604.125985] [7418.063000] Spawn status: SpawnModel: Successfully spawned model
bcr-lab@bcrlab-HP-Z800-Workstation:~$

but unable to spawn p3at in gazebo.

EDIT-2 One warning appears; image description

and here is rqt graph image description

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2016-09-16 09:14:57 -0600

I solved the isssue , and now i can spawn the same, here is my launch file,

<launch>

<!--##########################################################################-->
<!-- these are the arguments you can pass this launch file, for example paused:=true -->
<arg name="paused" default="false"/>
<arg name="use_sim_time" default="true"/>
<arg name="gui" default="true"/>
<arg name="headless" default="false"/>
<arg name="debug" default="false"/>
<!--##########################################################################-->
<!--Launching gazebo world -->
<arg name="world"  default="my_world"/>
 <include file="$(find gazebo_ros)/launch/empty_world.launch">
 <arg name="use_sim_time" value="true"/>
 <arg name="debug" value="false"/>
 <arg name="gui" value="true" />
 <arg name="world_name" value="$(find scca)/worlds/$(arg world).world"/>
 </include>
<!--##########################################################################-->
<arg name="urdf" default="$(find p3at_description)/urdf/pioneer3dx.xacro" />
<arg name="name" default="pioneer3at" />
<param name="robot_description" command="$(find xacro)/xacro.py $(arg urdf)" />
<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-param robot_description -urdf -model $(arg name)" />
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />
<!--##########################################################################-->
 </launch>
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-09-13 09:36:33 -0600

Seen: 278 times

Last updated: Sep 16 '16