Launch robot using sdf file

asked 2018-01-25 10:31:41 -0600

Feynman gravatar image

updated 2018-01-25 10:32:13 -0600

Hi,

I have a urdf robot model. To make the ros gazebo bumper plugin work, I had to convert the urdf file to the sdf format and make some custom changes.

Now I need to load updated sdf robot model instead of the urdf model.

Launch file:

<launch>                                                                           
<arg name="world_file"  default="$(env SUMMIT_WORLD_CIRCUIT1)"/>                                                             

<include file="$(find gazebo_ros)/launch/empty_world.launch">                    
    <arg name="use_sim_time" value="true"/>                                        
    <arg name="debug" value="false"/>                                                                           
    <arg name="world_name" value="$(arg world_file)"/>                             
</include>                                                                       


<!-- summit_xl_control launch file -->                                           
<include file="$(find summit_xl_control)/launch/summit_xl_omni_control.launch" />

<!-- launch pad -->                                                              
<include file="$(find summit_xl_pad)/launch/summit_xl_pad.launch" />               

<!-- Load the URDF into the ROS Parameter Server -->                              
<param name="robot_description"                                                  
     command="$(find xacro)/xacro.py '$(find summit_xl_description)/robots/summit_xl_omni.urdf.xacro'" />

<!-- Load the SDF into the ROS Parameter Server -->                               
<param name="robot_sdf" textfile="/home/ruettinger/Dokumente/Bachelorarbeit/Code/ba_ws/src/summit_xl_common/summit_xl_description/robots/summit_xl_omni.sdf" />        

<!-- Call a python script to the run a service call to gazebo_ros to spawn a SDF robot --> 
<node name="sdf_spawner" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen"
args="-sdf -model summit_xl 
-file /home/ruettinger/Dokumente/Bachelorarbeit/Code/ba_ws/src/summit_xl_common/summit_xl_description/robots/summit_xl_omni.sdf"/>

</launch>

The launch file doens't work.

When I load the robot model by hand, the visualization is buggy and I get the following warning.

rosrun gazebo_ros spawn_model -file /home/*****/summit_xl_omni.sdf -sdf -model test -y 0.0 -x -0.0

[WARN] [1516896999.247439, 0.260000]: Controller Spawner couldn't find the expected controller_manager ROS interface.

Does anybody know how to properly call a sdf file which was converted from a urdf file per hand?

edit retag flag offensive close merge delete