How to create custom joint trajectory for a custom controller
Hello,
I have created a custom controller based on effortJointInterface with position inputs. I have tested publishing a constant joint value for one joint and so far works well in gazebo. My next step is to use a LSPB trajectory (I already have a c++ file that creates the trajectory with position, velocity and accelerations) to command my robot.
I have been looking into jointtrajectorycontroller package (http://wiki.ros.org/joint_trajectory_controller) information but I dont understand how can I use my own cpp to command the robot. I see that this package uses trajectory_msgs/JointTrajectory.msg to command the points to the robot, but as I have never used this message type and package, I dont know how to start.
Can someone give me where I can find information about trajectory creation in ros? There is a lot of information about this and I'm a bit overwhelmed. My goal is to somehow combine this LSPB trajectory generator file with
if helps, this is my controller. yaml:
rrbot:
joint_state_controller:
type: joint_state_controller/JointStateController
publish_rate: 50
joint1_position_controller:
type: my_controller/MyPositionController
joint: joint1
kp: 500
kd: 30
ki: 0.05
joint2_position_controller:
type: effort_controllers/JointPositionController
joint: joint2
pid: {p: 100.0, i: 0.01, d: 10.0}
Thanks in advance!
Asked by mikell on 2023-01-19 05:11:01 UTC
Comments