Skip to content
This repository has been archived by the owner on Oct 9, 2019. It is now read-only.

Enable multiple robots #90

Merged
merged 7 commits into from
Jun 10, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions hros_cognition_mara_components/config/motors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ simulated_motors:
- "/hrim_actuation_servomotor_000000000002/trajectory_axis2"
- "/hrim_actuation_servomotor_000000000003/trajectory_axis1"
- "/hrim_actuation_servomotor_000000000003/trajectory_axis2"
# - "/hrim_actuation_servomotor_000000000005/trajectory_axis2"
YueErro marked this conversation as resolved.
Show resolved Hide resolved
# - "/hrim_actuation_servomotor_000000000005/trajectory_axis1"
# - "/hrim_actuation_servomotor_000000000006/trajectory_axis1"
# - "/hrim_actuation_servomotor_000000000006/trajectory_axis2"
# - "/hrim_actuation_servomotor_000000000007/trajectory_axis1"
# - "/hrim_actuation_servomotor_000000000007/trajectory_axis2"

real_motors:
- "/hrim_actuation_servomotor_70B3D521A042/trajectory_axis2"
Expand Down
8 changes: 4 additions & 4 deletions mara_description/urdf/mara.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<xacro:include filename="$(find mara_description)/urdf/mara.transmission.xacro" />
<xacro:include filename="$(find mara_description)/urdf/mara_gazebo.urdf.xacro" />

<xacro:macro name="mara_robot" params="prefix ee_link_distance">
<xacro:macro name="mara_robot" params="prefix ee_link_distance MAC1 MAC2 MAC3">

<link name="${prefix}base_link">
<inertial>
Expand Down Expand Up @@ -388,14 +388,14 @@
</joint>

<link name="${prefix}tool0"/>
<joint name="${prefix}${prefix}motor6_link-tool0_fixed_joint" type="fixed">
<joint name="${prefix}motor6_link-tool0_fixed_joint" type="fixed">
<origin rpy="0 -1.57 0" xyz="0 0.0 ${ee_link_distance}"/>
<parent link="${prefix}${prefix}motor6_link"/>
<parent link="${prefix}motor6_link"/>
<child link="${prefix}tool0"/>
</joint>

<xacro:mara_transmission prefix="${prefix}"/>
<xacro:mara_gazebo prefix="${prefix}"/>
<xacro:mara_gazebo prefix="${prefix}" MAC1="${MAC1}" MAC2="${MAC2}" MAC3="${MAC3}"/>

</xacro:macro>
</robot>
38 changes: 19 additions & 19 deletions mara_description/urdf/mara_gazebo.urdf.xacro
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://ros.org/wiki/xacro">

<xacro:macro name="mara_gazebo" params="prefix">
<xacro:macro name="mara_gazebo" params="prefix MAC1 MAC2 MAC3">

<gazebo>
<plugin name="mara_joint_state" filename="libgazebo_ros_joint_state_publisher.so">
<plugin name="${prefix}joint_state" filename="libgazebo_ros_joint_state_publisher.so">
<ros>
<argument>~/out:=joint_states</argument>
<argument>~/out:=${prefix}joint_states</argument>
</ros>
<update_rate>25</update_rate>
<joint_name>motor1</joint_name>
<joint_name>motor2</joint_name>
<joint_name>motor3</joint_name>
<joint_name>motor4</joint_name>
<joint_name>motor5</joint_name>
<joint_name>motor6</joint_name>
<joint_name>joint_finger</joint_name>
<joint_name>${prefix}motor1</joint_name>
<joint_name>${prefix}motor2</joint_name>
<joint_name>${prefix}motor3</joint_name>
<joint_name>${prefix}motor4</joint_name>
<joint_name>${prefix}motor5</joint_name>
<joint_name>${prefix}motor6</joint_name>
<joint_name>${prefix}joint_finger</joint_name>
</plugin>

<plugin name="hrim_actuation_servomotor_000000000001" filename="libmara_gazebo_joint_plugin.so">
<plugin name="hrim_actuation_servomotor${MAC1}" filename="libmara_gazebo_joint_plugin.so">
<ros></ros>
<axis1>motor2</axis1>
<axis2>motor1</axis2>
<axis1>${prefix}motor2</axis1>
<axis2>${prefix}motor1</axis2>
<type>series14</type>
</plugin>

<plugin name="hrim_actuation_servomotor_000000000002" filename="libmara_gazebo_joint_plugin.so">
<plugin name="hrim_actuation_servomotor${MAC2}" filename="libmara_gazebo_joint_plugin.so">
<ros></ros>
<axis1>motor3</axis1>
<axis2>motor4</axis2>
<axis1>${prefix}motor3</axis1>
<axis2>${prefix}motor4</axis2>
<type>series17</type>
</plugin>

<plugin name="hrim_actuation_servomotor_000000000003" filename="libmara_gazebo_joint_plugin.so">
<plugin name="hrim_actuation_servomotor${MAC3}" filename="libmara_gazebo_joint_plugin.so">
<ros></ros>
<axis1>motor5</axis1>
<axis2>motor6</axis2>
<axis1>${prefix}motor5</axis1>
<axis2>${prefix}motor6</axis2>
<type>series20</type>
</plugin>

Expand Down
2 changes: 1 addition & 1 deletion mara_description/urdf/mara_robot.urdf
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@
</actuator>
</transmission>
<gazebo>
<plugin filename="libgazebo_ros_joint_state_publisher.so" name="mara_joint_state">
<plugin filename="libgazebo_ros_joint_state_publisher.so" name="joint_state">
<ros>
<argument>~/out:=joint_states</argument>
</ros>
Expand Down
2 changes: 1 addition & 1 deletion mara_description/urdf/mara_robot.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<xacro:include filename="$(find mara_description)/urdf/mara.urdf.xacro" />

<!-- arm -->
<xacro:mara_robot prefix="" ee_link_distance="0.0"/>
<xacro:mara_robot prefix="" ee_link_distance="0.0" MAC1="_000000000001" MAC2="_000000000002" MAC3="_000000000003"/>

<link name="world" />

Expand Down
16 changes: 8 additions & 8 deletions mara_description/urdf/mara_robot_gripper_140.urdf
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@
</actuator>
</transmission>
<gazebo>
<plugin filename="libgazebo_ros_joint_state_publisher.so" name="mara_joint_state">
<plugin filename="libgazebo_ros_joint_state_publisher.so" name="joint_state">
<ros>
<argument>~/out:=joint_states</argument>
</ros>
Expand Down Expand Up @@ -748,8 +748,8 @@
<gazebo>
<joint name="left_inner_knuckle_to_finger" type="revolute">
<pose frame="">-0.0179 0 0.00652 0 0 0</pose>
<parent>mara::left_inner_knuckle</parent>
<child>mara::left_inner_finger</child>
<parent>left_inner_knuckle</parent>
<child>left_inner_finger</child>
<axis>
<xyz>0 1 0</xyz>
<limit>
Expand All @@ -762,8 +762,8 @@
</joint>
<joint name="right_inner_knuckle_to_finger" type="revolute">
<pose frame="">0.0179 0 0.00652 0 0 0</pose>
<parent>mara::right_inner_knuckle</parent>
<child>mara::right_inner_finger</child>
<parent>right_inner_knuckle</parent>
<child>right_inner_finger</child>
<axis>
<xyz>0 -1 0</xyz>
<limit>
Expand All @@ -774,16 +774,16 @@
</limit>
</axis>
</joint>
<plugin filename="librobotiq_gripper_gazebo_plugin.so" name="hrim_actuation_gripper_000000000004">
<kp>500</kp>
<plugin filename="librobotiq_gripper_gazebo_plugin.so" name="hrim_actuator_gripper_000000000004">
<kp>600</kp>
<ki>0.1</ki>
<kd>0.01</kd>
<joint>robotiq_arg2f_base_to_left_inner_knuckle</joint>
<joint>robotiq_arg2f_base_to_left_outer_knuckle</joint>
<joint>robotiq_arg2f_base_to_right_inner_knuckle</joint>
<joint>joint_finger</joint>
</plugin>
<plugin filename="libgazebo_ros_joint_state_publisher.so" name="mara_joint_state">
<plugin filename="libgazebo_ros_joint_state_publisher.so" name="joint_state">
<ros>
<argument>~/out:=joint_states</argument>
</ros>
Expand Down
4 changes: 2 additions & 2 deletions mara_description/urdf/mara_robot_gripper_140.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<xacro:include filename="$(find mara_description)/urdf/table.urdf.xacro" />

<!-- arm -->
<xacro:mara_robot prefix="" ee_link_distance="0.24497"/>
<xacro:robotiq_gripper prefix="mara" />
<xacro:mara_robot prefix="" ee_link_distance="0.24497" MAC1="_000000000001" MAC2="_000000000002" MAC3="_000000000003"/>
<xacro:robotiq_gripper prefix="" MAC="_000000000004"/>
<xacro:table prefix="" />

<link name="world" />
Expand Down
16 changes: 8 additions & 8 deletions mara_description/urdf/mara_robot_gripper_140_no_table.urdf
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@
</actuator>
</transmission>
<gazebo>
<plugin filename="libgazebo_ros_joint_state_publisher.so" name="mara_joint_state">
<plugin filename="libgazebo_ros_joint_state_publisher.so" name="joint_state">
<ros>
<argument>~/out:=joint_states</argument>
</ros>
Expand Down Expand Up @@ -748,8 +748,8 @@
<gazebo>
<joint name="left_inner_knuckle_to_finger" type="revolute">
<pose frame="">-0.0179 0 0.00652 0 0 0</pose>
<parent>mara::left_inner_knuckle</parent>
<child>mara::left_inner_finger</child>
<parent>left_inner_knuckle</parent>
<child>left_inner_finger</child>
<axis>
<xyz>0 1 0</xyz>
<limit>
Expand All @@ -762,8 +762,8 @@
</joint>
<joint name="right_inner_knuckle_to_finger" type="revolute">
<pose frame="">0.0179 0 0.00652 0 0 0</pose>
<parent>mara::right_inner_knuckle</parent>
<child>mara::right_inner_finger</child>
<parent>right_inner_knuckle</parent>
<child>right_inner_finger</child>
<axis>
<xyz>0 -1 0</xyz>
<limit>
Expand All @@ -774,16 +774,16 @@
</limit>
</axis>
</joint>
<plugin filename="librobotiq_gripper_gazebo_plugin.so" name="hrim_actuation_gripper_000000000004">
<kp>500</kp>
<plugin filename="librobotiq_gripper_gazebo_plugin.so" name="hrim_actuator_gripper_000000000004">
<kp>600</kp>
<ki>0.1</ki>
<kd>0.01</kd>
<joint>robotiq_arg2f_base_to_left_inner_knuckle</joint>
<joint>robotiq_arg2f_base_to_left_outer_knuckle</joint>
<joint>robotiq_arg2f_base_to_right_inner_knuckle</joint>
<joint>joint_finger</joint>
</plugin>
<plugin filename="libgazebo_ros_joint_state_publisher.so" name="mara_joint_state">
<plugin filename="libgazebo_ros_joint_state_publisher.so" name="joint_state">
<ros>
<argument>~/out:=joint_states</argument>
</ros>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<xacro:include filename="$(find robotiq_140_gripper_description)/urdf/robotiq_140.urdf.xacro" />

<!-- arm -->
<xacro:mara_robot prefix="" ee_link_distance="0.24497"/>
<xacro:robotiq_gripper prefix="mara" />
<xacro:mara_robot prefix="" ee_link_distance="0.24497" MAC1="_000000000001" MAC2="_000000000002" MAC3="_000000000003"/>
<xacro:robotiq_gripper prefix="" MAC="_000000000004"/>

<link name="world" />

Expand Down
14 changes: 7 additions & 7 deletions mara_description/urdf/mara_robot_gripper_85.urdf
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@
</actuator>
</transmission>
<gazebo>
<plugin filename="libgazebo_ros_joint_state_publisher.so" name="mara_joint_state">
<plugin filename="libgazebo_ros_joint_state_publisher.so" name="joint_state">
<ros>
<argument>~/out:=joint_states</argument>
</ros>
Expand Down Expand Up @@ -748,8 +748,8 @@
<gazebo>
<joint name="left_inner_knuckle_to_finger" type="revolute">
<pose frame="">-0.0179 0 0.00652 0 0 0</pose>
<parent>mara::left_inner_knuckle</parent>
<child>mara::left_inner_finger</child>
<parent>left_inner_knuckle</parent>
<child>left_inner_finger</child>
<axis>
<xyz>0 1 0</xyz>
<limit>
Expand All @@ -762,8 +762,8 @@
</joint>
<joint name="right_inner_knuckle_to_finger" type="revolute">
<pose frame="">0.0179 0 0.00652 0 0 0</pose>
<parent>mara::right_inner_knuckle</parent>
<child>mara::right_inner_finger</child>
<parent>right_inner_knuckle</parent>
<child>right_inner_finger</child>
<axis>
<xyz>0 -1 0</xyz>
<limit>
Expand All @@ -774,7 +774,7 @@
</limit>
</axis>
</joint>
<plugin filename="librobotiq_gripper_gazebo_plugin.so" name="hrim_actuation_gripper_000000000004">
<plugin filename="librobotiq_gripper_gazebo_plugin.so" name="hrim_actuator_gripper_000000000004">
<kp>10</kp>
<ki>10</ki>
<kd>0.1</kd>
Expand All @@ -783,7 +783,7 @@
<joint>robotiq_arg2f_base_link_to_right_inner_knuckle</joint>
<joint>joint_finger</joint>
</plugin>
<plugin filename="libgazebo_ros_joint_state_publisher.so" name="mara_joint_state">
<plugin filename="libgazebo_ros_joint_state_publisher.so" name="joint_state">
<ros>
<argument>~/out:=joint_states</argument>
</ros>
Expand Down
4 changes: 2 additions & 2 deletions mara_description/urdf/mara_robot_gripper_85.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<xacro:include filename="$(find mara_description)/urdf/table.urdf.xacro" />

<!-- arm -->
<xacro:mara_robot prefix="" ee_link_distance="0.18491"/>
<xacro:robotiq_85 prefix="mara" />
<xacro:mara_robot prefix="" ee_link_distance="0.18491" MAC1="_000000000001" MAC2="_000000000002" MAC3="_000000000003"/>
<xacro:robotiq_85 prefix="" MAC="_000000000004"/>
<xacro:table prefix="" />

<link name="world" />
Expand Down
6 changes: 3 additions & 3 deletions mara_description/urdf/mara_robot_gripper_hande.urdf
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@
</actuator>
</transmission>
<gazebo>
<plugin filename="libgazebo_ros_joint_state_publisher.so" name="mara_joint_state">
<plugin filename="libgazebo_ros_joint_state_publisher.so" name="joint_state">
<ros>
<argument>~/out:=joint_states</argument>
</ros>
Expand Down Expand Up @@ -548,14 +548,14 @@
<mimic joint="joint_finger" multiplier="1" offset="0"/>
</joint>
<gazebo>
<plugin filename="librobotiq_gripper_gazebo_plugin.so" name="hrim_actuation_gripper_000000000004">
<plugin filename="librobotiq_gripper_gazebo_plugin.so" name="hrim_actuator_gripper_000000000004">
<kp>500</kp>
<ki>3</ki>
<kd>9</kd>
<joint>joint_finger</joint>
<joint>robotiq_hande_base_to_right_finger</joint>
</plugin>
<plugin filename="libgazebo_ros_joint_state_publisher.so" name="mara_joint_state">
<plugin filename="libgazebo_ros_joint_state_publisher.so" name="joint_state">
<ros>
<argument>~/out:=joint_states</argument>
</ros>
Expand Down
4 changes: 2 additions & 2 deletions mara_description/urdf/mara_robot_gripper_hande.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<xacro:include filename="$(find mara_description)/urdf/table.urdf.xacro" />

<!-- arm -->
<xacro:mara_robot prefix="" ee_link_distance="0.18253"/>
<xacro:robotiq_hande prefix="mara" />
<xacro:mara_robot prefix="" ee_link_distance="0.18253" MAC1="_000000000001" MAC2="_000000000002" MAC3="_000000000003"/>
<xacro:robotiq_hande prefix="" MAC="_000000000004"/>
<xacro:table prefix="" />

<link name="world" />
Expand Down
Loading