joined robots simulation [closed]
Hi all!
I need to simulate two joined robots with gazebo simulator (ROS-fuerte). I am able to spawn both robots separately with their xacro files and staff in the same world, but I don't know how to indicate that the base_link of the second robot is attached to an other link of the first one. Basically I've to attach an arm to a mobile robot and I have to tell to the arm xacro that its parent link is the base_link of the mobile robot. In the robot2 xacro I use $(parent) specified as a parameter and parent has the value of robot1_name::base_link but it does not find that link.
Is there any example on how to join different robots toghether? Anyone has tried it?
Thank you very much!
Àngel.
EDIT:
I will try to be more specific: Actually the problem is not spawn the joined robots, the problem is spawn them working with both controllers. The first robot (quadrotor) uses an own controller, the second uses a pr2 controller. Basically when I try to spawn both robots joined, the spawner of the pr2_controller_manager makes no work the first controller. If I do not load the last node: pr2_controller_manager with iri_ros_controller (controller of the arm), the quadrotor controller works but the arm controller not. I cannot load the own build controller of the quadrotor with the pr2_controller_manager (as args of the node) because it has no specific type.
(Running the launch file as I attached, the quadrotor controller does not work because the pr2_controller_manager is launched without quadrotor args).
Here I attach the launch file (all in one):
<launch>
<!--************** Gazebo WORLD *******************-->
<include file="$(find hector_gazebo_worlds)/launch/rolling_landscape_120m.launch"/>
<!-- ************* Robot with no controllers ******-->
<arg name="model_quadrotor" default="$(find kinton_sim)/Media/urdf/quadrotor_hokuyo_utm30lx.urdf.xacro"/>
<!-- send the robot XML to param server -->
<param name="robot_description" command="$(find xacro)/xacro.py '$(arg model_quadrotor)'" />
<!-- push robot_description to factory and spawn robot in gazebo -->
<node name="spawn_quadrotor_robot" pkg="gazebo" type="spawn_model" args="-param robot_description -urdf -z 1.5 -model kinton" respawn="false" output="screen"/>
<!-- start robot state publisher -->
<node pkg="robot_state_publisher" type="state_publisher" name="kinton_state_publisher" output="screen" >
<param name="publish_frequency" type="double" value="50.0" />
</node>
<node name="ground_truth_to_tf" pkg="message_to_tf" type="message_to_tf" output="screen">
<param name="odometry_topic" value="ground_truth/state" />
<param name="frame_id" value="nav" />
</node>
<!-- Buffer Server -->
<node pkg="tf2_ros" type="buffer_server" name="tf2_buffer_server" output="screen">
<param name="buffer_size" value="120.0"/>
</node>
<!-- *********** Default Controllers *************>
<!-- Arm Control -->
<rosparam command="load" file="$(find kinton_sim)/controllers/iri_ros_controller.yaml" />
<!-- Start Default Controllers ********** PROBLEM HERE ********** -->
<node name="default_controllers_spawner" pkg="pr2_controller_manager" type="spawner" output="screen" args="iri_ros_controller" />
</launch>
If I use this last launch file, I cannot control the quadrotor and it appears at 0,0,0 of the world without moving when I launch the pr2_controller_manager spawner with the arm controller.
I have looked at the other answers similar to this one but their solutions do not work for me.
When you say "joined robots" do you mean something like a mobile robot base with a manipulator fixed on it?
Yes, it is.
Oh, sorry I did not attach info with the error. The problem is not to join the robots, the problem is to use pr2Controllermanager with the robot joined. I have edited the answer with new info.
Thank you dbworth but I was using what you told me...So this is not a valid answer for me...