Skip to content

Improve joint simulation #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: dev/noetic
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion stretch_description/urdf/stretch_main.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
xyz="-0.109461304328163 -0.000741018909047708 0.0914915269429946"
rpy="0 0 0" />
<mass
value="1.0723782659782" />
value="6.0" />
<inertia
ixx="0.00310580907710135"
ixy="1.5182848191076E-06"
Expand Down
10 changes: 9 additions & 1 deletion stretch_gazebo/config/arm.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
stretch_arm_controller:
type: "position_controllers/JointTrajectoryController"
type: "effort_controllers/JointTrajectoryController"
joints:
- joint_lift
- joint_arm_l3
Expand All @@ -21,3 +21,11 @@ stretch_arm_controller:
stop_trajectory_duration: 0.5
state_publish_rate: 25
action_monitor_rate: 10

gains:
joint_lift: { p: 500, d: 100, i: 0, i_clamp: 1 }
joint_arm_l3: { p: 100, d: 30, i: 0, i_clamp: 1 }
joint_arm_l2: { p: 100, d: 30, i: 0, i_clamp: 1 }
joint_arm_l1: { p: 100, d: 30, i: 0, i_clamp: 1 }
joint_arm_l0: { p: 100, d: 30, i: 0, i_clamp: 1 }
joint_wrist_yaw: { p: 100, d: 1, i: 0, i_clamp: 1 }
14 changes: 14 additions & 0 deletions stretch_gazebo/config/gazebo_ros_control_params.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
gazebo_ros_control/pid_gains:
#joint_right_wheel: {p: 10000, i: 0.0, d: 0.4}
#joint_left_wheel: {p: 10000, i: 0.0, d: 0.4}
joint_lift: {p: 5000, i: 0.0, d: 200}
joint_arm_l0: {p: 100, i: 0.0, d: 30}
joint_arm_l1: {p: 100, i: 0.0, d: 30}
joint_arm_l2: {p: 100, i: 0.0, d: 30}
joint_arm_l3: {p: 100, i: 0.0, d: 30}
joint_wrist_yaw: {p: 20, i: 5.0, d: 0.4}
joint_head_pan: {p: 2, i: 0.0, d: 0.4}
joint_head_tilt: {p: 2, i: 0.0, d: 0.4}
joint_gripper_finger_left: {p: 0.5, i: 0.0, d: 0.4}
joint_gripper_finger_right: {p: 0.5, i: 0.0, d: 0.4}

6 changes: 5 additions & 1 deletion stretch_gazebo/config/gripper.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
stretch_gripper_controller:
type: "position_controllers/JointTrajectoryController"
type: "effort_controllers/JointTrajectoryController"
joints:
- joint_gripper_finger_right
- joint_gripper_finger_left
Expand All @@ -13,3 +13,7 @@ stretch_gripper_controller:
stop_trajectory_duration: 0.5
state_publish_rate: 25
action_monitor_rate: 10

gains:
joint_gripper_finger_right: {p: 100, d: 1, i: 0, i_clamp: 1}
joint_gripper_finger_left: {p: 100, d: 1, i: 0, i_clamp: 1}
3 changes: 3 additions & 0 deletions stretch_gazebo/launch/gazebo.launch
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@

<node name="rviz" pkg="rviz" type="rviz" args="-d $(find stretch_gazebo)/config/sim.rviz" if="$(arg rviz)"/>

<rosparam command="load"
file="$(find stretch_gazebo)/config/gazebo_ros_control_params.yaml"/>

<rosparam command="load"
file="$(find stretch_gazebo)/config/joints.yaml"
ns="stretch_joint_state_controller" />
Expand Down
16 changes: 8 additions & 8 deletions stretch_gazebo/urdf/stretch_gazebo.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@
<mechanicalReduction>1</mechanicalReduction>
</actuator>
<joint name="joint_lift">
<hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
</joint>
</transmission>

Expand Down Expand Up @@ -428,7 +428,7 @@
<mechanicalReduction>1</mechanicalReduction>
</actuator>
<joint name="joint_arm_l0">
<hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
</joint>
</transmission>
<transmission name="trans_arm_l1">
Expand All @@ -437,7 +437,7 @@
<mechanicalReduction>1</mechanicalReduction>
</actuator>
<joint name="joint_arm_l1">
<hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
</joint>
</transmission>
<transmission name="trans_arm_l2">
Expand All @@ -446,7 +446,7 @@
<mechanicalReduction>1</mechanicalReduction>
</actuator>
<joint name="joint_arm_l2">
<hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
</joint>
</transmission>
<transmission name="trans_arm_l3">
Expand All @@ -455,7 +455,7 @@
<mechanicalReduction>1</mechanicalReduction>
</actuator>
<joint name="joint_arm_l3">
<hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
</joint>
</transmission>

Expand All @@ -475,7 +475,7 @@
<mechanicalReduction>1</mechanicalReduction>
</actuator>
<joint name="joint_wrist_yaw">
<hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
</joint>
</transmission>

Expand Down Expand Up @@ -585,7 +585,7 @@
<mechanicalReduction>1</mechanicalReduction>
</actuator>
<joint name="joint_gripper_finger_left">
<hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
</joint>
</transmission>
<transmission name="trans_gripper_finger_right">
Expand All @@ -594,7 +594,7 @@
<mechanicalReduction>1</mechanicalReduction>
</actuator>
<joint name="joint_gripper_finger_right">
<hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
</joint>
</transmission>

Expand Down