Skip to content
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

Adding configuration for Kinova Jaco 2 with 7DOF and 2-finger gripper (j2s7s200) #385

Open
wants to merge 4 commits into
base: noetic-devel
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
176 changes: 176 additions & 0 deletions kinova_control/config/j2s7s200_control.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
j2s7s200:
effort_finger_trajectory_controller:
constraints:
goal_time: 1.0
j2s7s200_joint_finger_1:
goal: 0.02
trajectory: 0.05
j2s7s200_joint_finger_2:
goal: 0.02
trajectory: 0.05
stopped_velocity_tolerance: 0.02
gains:
j2s7s200_joint_finger_1:
d: 0
i: 0
i_clamp: 1
p: 10
j2s7s200_joint_finger_2:
d: 0
i: 0
i_clamp: 1
p: 10
joints:
- j2s7s200_joint_finger_1
- j2s7s200_joint_finger_2
type: effort_controllers/JointTrajectoryController
effort_joint_trajectory_controller:
constraints:
goal_time: 1.0
j2s7s200_joint_1:
goal: 0.02
trajectory: 0.05
j2s7s200_joint_2:
goal: 0.02
trajectory: 0.05
j2s7s200_joint_3:
goal: 0.02
trajectory: 0.05
j2s7s200_joint_4:
goal: 0.02
trajectory: 0.05
j2s7s200_joint_5:
goal: 0.02
trajectory: 0.05
j2s7s200_joint_6:
goal: 0.02
trajectory: 0.05
j2s7s200_joint_7:
goal: 0.02
trajectory: 0.05
stopped_velocity_tolerance: 0.02
gains:
j2s7s200_joint_1:
d: 0
i: 0
i_clamp: 10
p: 2000
j2s7s200_joint_2:
d: 0
i: 0
i_clamp: 10
p: 3000
j2s7s200_joint_3:
d: 0
i: 0
i_clamp: 10
p: 1000
j2s7s200_joint_4:
d: 0
i: 0
i_clamp: 10
p: 2000
j2s7s200_joint_5:
d: 0
i: 0
i_clamp: 10
p: 200
j2s7s200_joint_6:
d: 0
i: 0
i_clamp: 10
p: 500
j2s7s200_joint_7:
d: 0
i: 0
i_clamp: 10
p: 200
joints:
- j2s7s200_joint_1
- j2s7s200_joint_2
- j2s7s200_joint_3
- j2s7s200_joint_4
- j2s7s200_joint_5
- j2s7s200_joint_6
- j2s7s200_joint_7
type: effort_controllers/JointTrajectoryController
finger_1_position_controller:
joint: j2s7s200_joint_finger_1
pid:
d: 0
i: 0
p: 10
type: effort_controllers/JointPositionController
finger_2_position_controller:
joint: j2s7s200_joint_finger_2
pid:
d: 0
i: 0
p: 10
type: effort_controllers/JointPositionController
finger_tip_1_position_controller:
joint: j2s7s200_joint_finger_tip_1
pid:
d: 0
i: 0
p: 0.5
type: effort_controllers/JointPositionController
finger_tip_2_position_controller:
joint: j2s7s200_joint_finger_tip_2
pid:
d: 0
i: 0
p: 0.5
type: effort_controllers/JointPositionController
joint_1_position_controller:
joint: j2s7s200_joint_1
pid:
d: 0
i: 0
p: 2000
type: effort_controllers/JointPositionController
joint_2_position_controller:
joint: j2s7s200_joint_2
pid:
d: 0
i: 0
p: 3000
type: effort_controllers/JointPositionController
joint_3_position_controller:
joint: j2s7s200_joint_3
pid:
d: 0
i: 0
p: 1000
type: effort_controllers/JointPositionController
joint_4_position_controller:
joint: j2s7s200_joint_4
pid:
d: 0
i: 0
p: 2000
type: effort_controllers/JointPositionController
joint_5_position_controller:
joint: j2s7s200_joint_5
pid:
d: 0
i: 0
p: 200
type: effort_controllers/JointPositionController
joint_6_position_controller:
joint: j2s7s200_joint_6
pid:
d: 0
i: 0
p: 500
type: effort_controllers/JointPositionController
joint_7_position_controller:
joint: j2s7s200_joint_7
pid:
d: 0
i: 0
p: 200
type: effort_controllers/JointPositionController
joint_state_controller:
publish_rate: 50
type: joint_state_controller/JointStateController
58 changes: 29 additions & 29 deletions kinova_control/launch/kinova_control.launch
Original file line number Diff line number Diff line change
@@ -1,75 +1,75 @@
<launch>
<arg name="kinova_robotType" default="j2n6s300"/>
<arg name="kinova_robotName" default="$(arg kinova_robotType)"/>
<arg name="kinova_robotName" default="$(arg kinova_robotType)"/>
<arg name="use_trajectory_controller" default="true"/>
<arg name="is7dof" default="false"/>
<arg name="has2finger" default="false"/><!-- if false: 3 finger, true: 2 finger -->
<arg name="description_name" default="robot_description"/><!-- allows remapping of robot_description into a namespace -->

<!-- Load joint controller configurations from YAML file to parameter server -->
<rosparam file="$(find kinova_control)/config/$(arg kinova_robotName)_control.yaml" command="load"/>

<group unless="$(arg use_trajectory_controller)">
<group unless="$(arg is7dof)">
<!-- load the joint by joint position controllers -->
<!-- load the joint by joint position controllers -->
<node name="$(arg kinova_robotName)_joints_controller" pkg="controller_manager" type="spawner" respawn="false"
output="screen" ns="$(arg kinova_robotName)" unless="$(arg has2finger)"
args="joint_1_position_controller joint_2_position_controller
args="joint_1_position_controller joint_2_position_controller
joint_3_position_controller joint_4_position_controller
joint_5_position_controller joint_6_position_controller
finger_2_position_controller finger_1_position_controller
joint_5_position_controller joint_6_position_controller
finger_2_position_controller finger_1_position_controller
finger_3_position_controller finger_tip_1_position_controller
finger_tip_2_position_controller finger_tip_3_position_controller
joint_state_controller"/>
joint_state_controller"/>
<node name="$(arg kinova_robotName)_joints_controller" pkg="controller_manager" type="spawner" respawn="false"
output="screen" ns="$(arg kinova_robotName)" if="$(arg has2finger)"
args="joint_1_position_controller joint_2_position_controller
args="joint_1_position_controller joint_2_position_controller
joint_3_position_controller joint_4_position_controller
joint_5_position_controller joint_6_position_controller
finger_2_position_controller finger_1_position_controller
joint_5_position_controller joint_6_position_controller
finger_2_position_controller finger_1_position_controller
finger_tip_1_position_controller finger_tip_2_position_controller
joint_state_controller"/>
</group>
<group if="$(arg is7dof)">
<!-- load the joint by joint position controllers -->
<!-- load the joint by joint position controllers -->
<node name="$(arg kinova_robotName)_joints_controller" pkg="controller_manager" type="spawner" respawn="false"
output="screen" ns="$(arg kinova_robotName)" unless="$(arg has2finger)"
args="joint_1_position_controller joint_2_position_controller
args="joint_1_position_controller joint_2_position_controller
joint_3_position_controller joint_4_position_controller
joint_5_position_controller joint_6_position_controller joint_7_position_controller
finger_2_position_controller finger_1_position_controller
finger_2_position_controller finger_1_position_controller
finger_3_position_controller finger_tip_1_position_controller
finger_tip_2_position_controller finger_tip_3_position_controller
joint_state_controller"/>
joint_state_controller"/>
<node name="$(arg kinova_robotName)_joints_controller" pkg="controller_manager" type="spawner" respawn="false"
output="screen" ns="$(arg kinova_robotName)" if="$(arg has2finger)"
args="joint_1_position_controller joint_2_position_controller
args="joint_1_position_controller joint_2_position_controller
joint_3_position_controller joint_4_position_controller
joint_5_position_controller joint_6_position_controller joint_7_position_controller
finger_2_position_controller finger_1_position_controller
finger_3_position_controller finger_tip_1_position_controller
finger_tip_2_position_controller finger_tip_3_position_controller
joint_state_controller"/>
finger_2_position_controller finger_1_position_controller
finger_tip_1_position_controller
finger_tip_2_position_controller
joint_state_controller"/>
</group>
</group>

<group if="$(arg use_trajectory_controller)">
<!-- Effort Joint trajectory controller-->
<node name="$(arg kinova_robotName)_trajectory_controller" pkg="controller_manager" type="spawner"
<node name="$(arg kinova_robotName)_trajectory_controller" pkg="controller_manager" type="spawner"
output="screen" ns="$(arg kinova_robotName)" unless="$(arg has2finger)"
args="effort_joint_trajectory_controller
effort_finger_trajectory_controller
effort_finger_trajectory_controller
finger_tip_1_position_controller
finger_tip_2_position_controller
finger_tip_2_position_controller
finger_tip_3_position_controller
joint_state_controller"/>
<node name="$(arg kinova_robotName)_trajectory_controller" pkg="controller_manager" type="spawner"
<node name="$(arg kinova_robotName)_trajectory_controller" pkg="controller_manager" type="spawner"
output="screen" ns="$(arg kinova_robotName)" if="$(arg has2finger)"
args="effort_joint_trajectory_controller
effort_finger_trajectory_controller
effort_finger_trajectory_controller
finger_tip_1_position_controller
finger_tip_2_position_controller
joint_state_controller"/>
finger_tip_2_position_controller
joint_state_controller"/>
</group>

<!-- convert joint states to TF transforms for rviz, etc -->
Expand All @@ -78,9 +78,9 @@
<remap from="/joint_states" to="/$(arg kinova_robotName)/joint_states"/>
<remap from="robot_description" to="$(arg description_name)"/>
</node>

<node name="command_robot_home_pose" pkg="kinova_control" type="move_robot.py"
respawn="false" output="screen" args="$(arg kinova_robotType)">
respawn="false" output="screen" args="$(arg kinova_robotType)">
</node>

</launch>
1 change: 1 addition & 0 deletions kinova_control/src/move_robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def moveFingers (jointcmds,prefix,nbJoints):
point = JointTrajectoryPoint()
jointCmd.header.stamp = rospy.Time.now() + rospy.Duration.from_sec(0.0);
point.time_from_start = rospy.Duration.from_sec(5.0)

for i in range(0, nbJoints):
jointCmd.joint_names.append(prefix +'_joint_finger_'+str(i+1))
point.positions.append(jointcmds[i])
Expand Down
Loading