I am currently working on a project where I spawn and control 2 arms independently in the same scene for a robot. I am going off of the OpenManipulator documentation/tutorials and using MoveIt to control their default arm, from this link:
http://emanual.robotis.com/docs/en/pl...
and
http://emanual.robotis.com/docs/en/pl...
So the idea is that, in a few different terminals, I am running the following commands to spawn a gazebo and rviz instance that are tied together, and I am able to use the provided GUI to manipulate a single arm or use code.
$ roslaunch open_manipulator_gazebo open_manipulator_gazebo.launch (spawns gazebo and robot arm with basic topics/nodes)
$ roslaunch open_manipulator_controller open_manipulator_controller.launch use_platform:=false (spawns rvis, with the same arm, and creates moveit controllers for the arm. I also modified this launch file to turn moveit to true)
$ roslaunch open_manipulator_control_gui open_manipulator_control_gui.launch (spawns provided gui)
I want to manipulate the launch files somehow to spawn a second arm that I can manipulate independently the same way I can control the first arm. I am finding no luck so far, and I am still working on the gazebo one. Not sure how I will go about the controller one that spawns rviz.
I manipulated the gazebo launch file as follows and was able to get 2 arms to show up, but not getting the topics or services to group separately or have their own unique names, or even spawn.
open_manipulator_gazebo.launch
<launch>
<!-- These are the arguments you can pass this launch file, for example paused:=true -->
<arg name="use_robot_name" default="open_manipulator"
doc="Must match the robotNamespace tag in the gazebo description file"/>
<arg name="use_robot_name_2" default="open_manipulator_2"
doc="Must match the robotNamespace tag in the gazebo description file"/>
<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"/>
<!-- 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 open_manipulator_gazebo)/worlds/empty.world"/>
<arg name="debug" value="$(arg debug)" />
<arg name="gui" value="$(arg gui)" />
<arg name="paused" value="$(arg paused)"/>
<arg name="use_sim_time" value="$(arg use_sim_time)"/>
<arg name="headless" value="$(arg headless)"/>
</include>
<!-- Load the URDF into the ROS Parameter Server -->
<param name="robot_description"
command="$(find xacro)/xacro --inorder '$(find open_manipulator_description)/urdf/open_manipulator.urdf.xacro'"/>
<!-- Run a python script to the send a service call to gazebo_ros to spawn a URDF robot -->
<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen"
args="-urdf -model open_manipulator -z 0.0 -param robot_description"/>
<!-- Load the URDF into the ROS Parameter Server -->
<param name="robot_description_2"
command="$(find xacro)/xacro --inorder '$(find open_manipulator_description)/urdf/open_manipulator.urdf.xacro'"/>
<!-- Run a python script to the send a service call to gazebo_ros to spawn a URDF robot -->
<node name="urdf_spawner_2" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen"
args="-urdf -model open_manipulator_2 -y 1.0 -param robot_description_2"/>
<!-- ros_control robotis manipulator launch file -->
<include file="$(find open_manipulator_gazebo)/launch/open_manipulator_controller.launch">
<arg name="use_robot_name" value="$(arg use_robot_name)"/>
<arg name="use_robot_name_2" value="$(arg use_robot_name_2)"/>
</include>
</launch>
open_manipulator_controller.launch (the one in the open_manipulator_gazebo package, not open_manipulator_controller package. this one is called by the above launch file)
<launch>
<arg name="use_robot_name" />
<arg name="use_robot_name_2" />
<!--default="open_manipulator"-->
<group ns="/robot_1">
<!-- Load joint controller configurations from YAML file to parameter server -->
<rosparam file="$(find open_manipulator_gazebo)/config/open_manipulator_controller.yaml" command="load"
ns="$(arg use_robot_name)"/>
<!-- load the controllers -->
<node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false"
output="screen" ns="$(arg use_robot_name)" args="joint_state_controller
joint1_position
joint2_position
joint3_position
joint4_position
gripper_position
gripper_sub_position"/>
<!-- Run gripper sub position publisher -->
<node name="gripper_sub_publisher" pkg="open_manipulator_gazebo" type="gripper_sub_publisher" output="screen" ns="$(arg use_robot_name)"/>
</group>
<group ns="/robot_2">
<!-- Load joint controller configurations from YAML file to parameter server -->
<rosparam file="$(find open_manipulator_gazebo)/config/open_manipulator_controller.yaml" command="load"
ns="$(arg use_robot_name_2)"/>
<!-- load the controllers -->
<node name="controller_spawner_2" pkg="controller_manager" type="spawner" respawn="false"
output="screen" ns="$(arg use_robot_name_2)" args="joint_state_controller
joint1_position
joint2_position
joint3_position
joint4_position
gripper_position
gripper_sub_position"/>
<!-- Run gripper sub position publisher -->
<node name="gripper_sub_publisher_2" pkg="open_manipulator_gazebo" type="gripper_sub_publisher" output="screen" ns="$(arg use_robot_name_2)"/>
</group>
</launch>
This is where the original source code is from so you can compare it to the original launch files: https://github.com/ROBOTIS-GIT/open_m...
Any help would be appreciated. I am quite new to ROS, forgive me if I overlooked something simple. If I left out any important information let me know and I'll be happy to provide it.
Thank you for your time
Sincerely,
Alfred Shaker