Skip to content

Commit

Permalink
Updating version
Browse files Browse the repository at this point in the history
  • Loading branch information
calebescobedo committed Jul 17, 2024
2 parents 5d7a265 + dfdd17d commit 2f6b9e6
Show file tree
Hide file tree
Showing 5 changed files with 221 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@

See the [Franka Control Interface (FCI) documentation][fci-docs] for more information.

## My Changes

In order to integrate the panda robot into gazebo I made changes to the following files:

- franka_description/robots/hand.xacro
- franka_description/robots/panda_arm.xacro
- franka_description/robots/panda_arm_hand.urdf.xacro

I added the following files to the repository:

- franka_description/robots/panda.gazebo.xacro
- franka_description/robots/panda.transmission.xacro

## License

All packages of `franka_ros` are licensed under the [Apache 2.0 license][apache-2.0].
Expand Down
94 changes: 94 additions & 0 deletions franka_description/robots/panda.gazebo.xacro
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<?xml version="1.0"?>

<robot xmlns:xacro="http://www.ros.org/wiki/xacro">

<xacro:macro name="panda_gazebo" params="robot_name">

<!-- Link0 -->
<gazebo reference="${robot_name}_link0">
<material>Gazebo/Grey</material>
<mu1>0.2</mu1>
<mu2>0.2</mu2>
</gazebo>

<!-- Link1 -->
<gazebo reference="${robot_name}_link1">
<material>Gazebo/White</material>
<mu1>0.2</mu1>
<mu2>0.2</mu2>
</gazebo>

<!-- Link2 -->
<gazebo reference="${robot_name}_link2">
<material>Gazebo/White</material>
<mu1>0.2</mu1>
<mu2>0.2</mu2>
</gazebo>

<!-- Link3 -->
<gazebo reference="${robot_name}_link3">
<material>Gazebo/White</material>
<mu1>0.2</mu1>
<mu2>0.2</mu2>
</gazebo>

<!-- Link4 -->
<gazebo reference="${robot_name}_link4">
<material>Gazebo/White</material>
<mu1>0.2</mu1>
<mu2>0.2</mu2>
</gazebo>

<!-- Link5 -->
<gazebo reference="${robot_name}_link5">
<material>Gazebo/White</material>
<mu1>0.2</mu1>
<mu2>0.2</mu2>
</gazebo>

<!-- Link6 -->
<gazebo reference="${robot_name}_link6">
<material>Gazebo/White</material>
<mu1>0.2</mu1>
<mu2>0.2</mu2>
</gazebo>

<!-- Link7 -->
<gazebo reference="${robot_name}_link7">
<material>Gazebo/Grey</material>
<mu1>0.2</mu1>
<mu2>0.2</mu2>
</gazebo>

<!-- Link8 -->
<gazebo reference="${robot_name}_link8">
<material>Gazebo/Grey</material>
<mu1>0.2</mu1>
<mu2>0.2</mu2>
</gazebo>

<!-- LinkHand -->
<gazebo reference="${robot_name}_hand">
<material>Gazebo/Grey</material>
<mu1>0.2</mu1>
<mu2>0.2</mu2>
</gazebo>

<!-- LinkRightFinger -->
<gazebo reference="${robot_name}_rightfinger">
<material>Gazebo/Grey</material>
<mu1>0.2</mu1>
<mu2>0.2</mu2>
</gazebo>

<!-- LinkLeftFinger -->
<gazebo reference="${robot_name}_leftfinger">
<material>Gazebo/Grey</material>
<mu1>0.2</mu1>
<mu2>0.2</mu2>
</gazebo>

</xacro:macro>

</robot>

112 changes: 112 additions & 0 deletions franka_description/robots/panda.transmission.xacro
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">
<xacro:macro name="panda_transmission" params="robot_name">


<!-- Load Gazebo lib and set the robot namespace -->
<gazebo>
<plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
<!-- <robotNamespace>/${robot_name}</robotNamespace> -->
</plugin>
</gazebo>

<transmission name="${robot_name}_tran_1">
<type>transmission_interface/SimpleTransmission</type>
<joint name="${robot_name}_joint1">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
</joint>
<actuator name="${robot_name}_motor_1">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>

<transmission name="${robot_name}_tran_2">
<type>transmission_interface/SimpleTransmission</type>
<joint name="${robot_name}_joint2">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
</joint>
<actuator name="${robot_name}_motor_2">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>

<transmission name="${robot_name}_tran_3">
<type>transmission_interface/SimpleTransmission</type>
<joint name="${robot_name}_joint3">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
</joint>
<actuator name="${robot_name}_motor_3">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>

<transmission name="${robot_name}_tran_4">
<type>transmission_interface/SimpleTransmission</type>
<joint name="${robot_name}_joint4">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
</joint>
<actuator name="${robot_name}_motor_4">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>

<transmission name="${robot_name}_tran_5">
<type>transmission_interface/SimpleTransmission</type>
<joint name="${robot_name}_joint5">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
</joint>
<actuator name="${robot_name}_motor_5">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>

<transmission name="${robot_name}_tran_6">
<type>transmission_interface/SimpleTransmission</type>
<joint name="${robot_name}_joint6">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
</joint>
<actuator name="${robot_name}_motor_6">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>

<transmission name="${robot_name}_tran_7">
<type>transmission_interface/SimpleTransmission</type>
<joint name="${robot_name}_joint7">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
</joint>
<actuator name="${robot_name}_motor_7">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>

<transmission name="${robot_name}_leftfinger">
<type>transmission_interface/SimpleTransmission</type>
<joint name="${robot_name}_finger_joint1">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
</joint>
<actuator name="${robot_name}_finger_joint1">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>

<transmission name="${robot_name}_rightfinger">
<type>transmission_interface/SimpleTransmission</type>
<joint name="${robot_name}_finger_joint2">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
</joint>
<actuator name="${robot_name}_finger_joint2">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>
</xacro:macro>
</robot>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<launch>
<arg name="robot" default="fr3" doc="choose your robot. Possible values: [panda, fr3]"/>
<arg name="arm_id" default="$(arg robot)" />
<arg name="robot_ip" default="192.168.0.198"/>
<include file="$(find franka_control)/launch/franka_control.launch" pass_all_args="true"/>
<rosparam command="load" file="$(find franka_example_controllers)/config/franka_example_controllers.yaml" subst_value="true" />
<node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="hiro_cartesian_impedance_example_controller"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<launch>
<arg name="robot" default="fr3" doc="choose your robot. Possible values: [panda, fr3]"/>
<arg name="arm_id" default="$(arg robot)" />
<arg name="robot_ip" default="192.168.0.198"/>
<include file="$(find franka_control)/launch/franka_control.launch" pass_all_args="true"/>
<rosparam command="load" file="$(find franka_example_controllers)/config/franka_example_controllers.yaml" subst_value="true" />
<node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="hiro_joint_impedance_example_controller"/>
Expand Down

0 comments on commit 2f6b9e6

Please sign in to comment.