-
Notifications
You must be signed in to change notification settings - Fork 159
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
Exceeding Speed limit when using xarm_controller on Lite6 #227
Comments
Hi @pedrofontanatf, may I know how you interface with the FollowJointTrajectory action / JointTrajectoryController and send joint commands? Did you setup an action client and send your target trough In our demo package, normally Moveit will be the role to generate the above mentioned trajectory message. And the command should not only specify the target joint positions, but also the joint velocity, acceleration as well as the time (from start) in a trajectory. I will post a sample moveit generated trajectory:
After receiving this trajectory message (speed/acceleration/time calculated by time parameterization algorithm), the loaded ros controller ( That is to say, you may need to be able to generate the trajectory via points with speed/acceleration/time info in order to make the ros controller interpolation and limit enforcement to work. If you are just sending pure position updates, maybe only |
@pedrofontanatf |
Hi everyone,
Sorry if this seems too basic, I'm no expert neither in robotics nor in ROS. We're using a Lite6 to test an AI model that directly outputs position commands to the joints. We setup controllers with
ros_control
(position_controllers/JointPositionController
, so as per my understanding this just forwards our model's output without caring on the PID gains set) and bring up auf_ros_controller
node ofxarm_controller
package. The thing is that no matter which joint limits we define in the YAML file, we always exceed speed limit and need to reset the robot state (this log message shows the correct limits being set, so it makes me think that the issue is not coming from the limits not being read from the config file).Digging a bit into your code we discovered that in uf_ros_controller you use move_servo_j which as per my understanding would execute the command as fast as possible, so I'd expect the
joint_limits_interface
interfaces set inuf_ros_controller
to be the ones saturating commands within defined limits, but that's not happening). Our model would adapt if the command has not finished and it's currently outputting commands at 100 Hz (so we don't care much if last command was not completed)I'm mentioning this because we got our model to work by spawning a
uf_driver
node fromxarm_api
package, setting working mode to 6 and calling the service it exposesmove_joint
with our model's output (in a client node that subscribes to our model's output and calls the mentioned service). By looking at the code,uf_driver
uses the set_servo_angle function of the SDK (which again from what I've understood supports multiple modes and allows us to set desired speed).The thing is that in order to have consistency and a smooth transition between our simulation (using Gazebo and
gazebo_ros_control
plugin which connects to the position controllers) and the real-world case, we'd truly like to use theHardwareInterface
you setup onxarm_controller
, but we need the speed limits defined in the YAML file to be enforced. Could you please tell me how to enforce those?Looking forward to your reply, thanks in advance!
The text was updated successfully, but these errors were encountered: