0

I am trying to tune velocity PID controllers for a robot arm by sending a sine wave and finding constants that cause the arm to follow as closely as possible.

First, I launch RQT GUI with the following command:

rosrun rqt_gui rqt_gui

Then I set my topic to /arm_velocity_controller/command (that's my velocity controller), type to trajectory_msgs/JointTrajectory, and rate to 50 Hz. I verified if I send messages to that directly the controller responds by moving the motors, so it's a valid topic and type.

Next I click the "+" button to add a row, expand the row, and set the joint_names member of the message to ["upperarm_actuator"], the same way I do it when moving the motors by sending velocity commands. This works.

Finally it's time to specify the trajectory points. I just want to publish a velocity command for this one joint with a single trajectory point. I enter the following in points member of the joint trajectory message:

[{ "velocities": [0.0], "positions": [0.0], "time_from_start": { "secs": 0.001 } }]

Not trying anything crazy yet (figuring out how to plugin in a sine wave is my next task). However, RQT cannot parse the message:

serialization error: field points[] must be of type [trajectory_msgs/JointTrajectoryPoint]

It appears that when I quote sub-object key names like velocities and positions, it cannot parse the message. If I don't quote the sub-object keys, then it can't parse at all.

Maybe it's not possible to set expression to an array of objects with sub-arrays and sub-objects? I noticed that other tutorials send different types to the velocity controller command topic, like an array of Float64 - how does that work if it accepts JointTrajectory?

Valeriy Novytskyy
  • 775
  • 1
  • 7
  • 18

0 Answers0