I am trying to create a script to control my robot using an action. The action server was already created by Joint Trajectory Controller and I had to make the action client. The issue I am having is that it continues to give me this error:
Joints on incoming trajectory don't match the controller joints.
I assume the reason I am getting this error though is because my yaml file keeps giving me this message, which isn't given as an error message but a info message:
No specific joint names are used for command interfaces. Using 'joints' parameter.
I do not understand why though because I am using a generic Joint Trajectory Controller yaml setup that is supposedly setup correctly, here it is:
controller_manager:
ros__parameters:
update_rate: 100 #Hz
arm_controller:
type: joint_trajectory_controller/JointTrajectoryController
joint_state_broadcaster:
type: joint_state_broadcaster/JointStateBroadcaster
arm_controller:
ros__parameters:
joints:
- shoulder_pan_joint
- shoulder_lift_joint
- elbow_joint
- wrist_1_joint
- wrist_2_joint
- wrist_3_joint
command_interfaces:
- position
state_interfaces:
- position
- velocity
As of now I am just trying to control a single joint on the robot, which happens to be the Elbow joint. I am able to control it through rqt but am trying to get actions working. Here is a snippet of my code for the action client that tells it which joint to use:
def __init__(self):
super().__init__('move_elbow_actionclient')
self._action_client = ActionClient(
self, FollowJointTrajectory, '/arm_controller/follow_joint_trajectory'
)
#where the goal gets sent
def send_goal(self, angle):
goal_msg = FollowJointTrajectory.Goal()
#what joint it controls
joint_names = ["elbow_joint"]
Thank you for your support and if any more information is needed please let me know!