Open duygiang1162 opened 5 months ago
controller.yaml:
# by bcc
controller_manager_ns: /
controller_list:
- name: dsr_joint_trajectory_controller
action_ns: follow_joint_trajectory
type: FollowJointTrajectory
default: true
joints:
- joint1
- joint2
- joint3
- joint4
- joint5
- joint6
- name: gripper_controller
action_ns: follow_joint_trajectory
default: True
type: FollowJointTrajectory
joints:
- robotiq_85_left_knuckle_joint
# ends
ros_controller.yaml:
m0609:
# MoveIt-specific simulation settings
moveit_sim_hw_interface:
joint_model_group: controllers_initial_group_
joint_model_group_pose: controllers_initial_pose_
# Settings for ros_control control loop
generic_hw_control_loop:
loop_hz: 300
cycle_time_error_threshold: 0.01
# Settings for ros_control hardware interface
hardware_interface:
joints:
- joint1
- joint2
- joint3
- joint4
- joint5
- joint6
- robotiq_85_left_knuckle_joint
sim_control_mode: 1 # 0: position, 1: velocity
# Publish all joint states
# Creates the /joint_states topic necessary in ROS
joint_state_controller:
type: joint_state_controller/JointStateController
publish_rate: 50
controller_list:
[]
dsr_joint_position_controller:
type: position_controllers/JointPositionController
joints:
- joint1
- joint2
- joint3
- joint4
- joint5
- joint6
gains:
joint1:
p: 100
d: 1
i: 1
i_clamp: 1
joint2:
p: 100
d: 1
i: 1
i_clamp: 1
joint3:
p: 100
d: 1
i: 1
i_clamp: 1
joint4:
p: 100
d: 1
i: 1
i_clamp: 1
joint5:
p: 100
d: 1
i: 1
i_clamp: 1
joint6:
p: 100
d: 1
i: 1
i_clamp: 1
gripper_controller:
type: effort_controllers/JointTrajectoryController
joints:
- robotiq_85_left_knuckle_joint
gains:
robotiq_85_left_knuckle_joint:
p: 40
d: 0
i: 0
i_clamp: 1
ros_controller.launch:
<?xml version="1.0"?>
<launch>
<!-- Load joint controller configurations from YAML file to parameter server -->
<rosparam file="$(find moveit_config_m0609)/config/ros_controllers.yaml" command="load"/>
<!-- Load the controllers -->
<node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false"
output="screen" ns="m0609" args="dsr_joint_position_controller
gripper_controller"/>
<!-- <node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false"
output="screen" args="dsr_joint_position_controller gripper_controller joint_state_controller"/> -->
<!-- Convert joint states to TF transforms for rviz, etc -->
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher"
respawn="false" output="screen">
<remap from="/joint_states" to="m0609/joint_states" />
</node>
</launch>
Dear @duygiang1162,
I think that as step of controller spwaner, you missed spawner ros_controller so that there are no initialized ros controller params as your controller manager screen.
I have edited moveit to better suit my work. Specifically, I added a controller for the gripper in the controller.yaml file. However when launching
roslaunch dsr_launcher dsr_moveit_gazebo.launch mode:=virtal model:=m0609 color:=blue
And in the terminal an error appears: [ WARN] [1712663463.501873327, 7.068000000]: Waiting for gripper_controller/follow_joint_trajectory to come up [ERROR] [1712663474.810434039, 9.264000000]: Unable to connect to move_group action server 'move_group' within allotted time (30s) [ WARN] [1712663496.164532178, 13.068000000]: Waiting for gripper_controller/follow_joint_trajectory to come up I discovered that, when I tried to add configuration code to the gripper:Then other controllers will not be initialized. If I don't add it, it will run normally. I searched a lot for solutions, but couldn't solve the problem. Thank you for reading this far, I look forward to receiving your solution, no matter how small. I can provide more information about my file files to solve this problem.