Spawning urdf with a launch file & PID controls
Hi, I am trying to launch my world file with my custom robot spawned at launch, I follow the urdf tutorial at Gazebo main page, but the model won't spawn.
<launch>
<!-- We resume the logic in empty_world.launch, changing only the name of the world to be launched -->
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="world_name" value="$(find kuka_kr3_gazebo)/worlds/kuka_kr3.world"/>
<!-- more default parameters can be changed here -->
</include>
<!-- Spawn a robot into Gazebo -->
<param name="robot_description" textfile="$(find kuka_kr3_description)/urdf/model.urdf"/>
<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-file $(find kuka_kr3_description)/urdf/model.urdf -urdf -param robot_description -x 0.0 -y 0.0 -z 0.1 -model kuka_kr3" respawn="false" output="screen"/>
</launch>
The launch file runs 'correctly' but there is no robot model, I think this piece of log from console might be connected:
process[rosout-1]: started with pid [7932]
started core service [/rosout]
process[gazebo-2]: started with pid [7940]
process[gazebo_gui-3]: started with pid [7950]
process[spawn_urdf-4]: started with pid [7958]
SpawnModel script started
No handlers could be found for logger "rosout"
[ INFO] [1507552317.153725427]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1507552317.154071045]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[spawn_urdf-4] process has finished cleanly
I can spawn the robot model using rosrun command
rosrun gazebo_ros spawn_model -file `rospack find kuka_kr3_description`/urdf/model.urdf -urdf -x 0 -y 0 -z 1 -model kuka_kr3
but this isn't exactly what I want.
I am also wondering if that may cause problems that I have with a controller - the values of PID from controller aren't the same as the ones in Gazebo, and I think that causes problems when I try to control it from Moveit.
EDIT that part with the controller has not been connected with that, but the spawning problem still remains.