Kinovarobotics / kinova-ros

ROS packages for Jaco2 and Mico robotic arms
BSD 3-Clause "New" or "Revised" License
363 stars 318 forks source link

Understanding measurements of Torque control #414

Closed Betancourt20 closed 1 year ago

Betancourt20 commented 1 year ago

Description

Hi,

I'm trying to understand the meaning of my measurements obtained by /j2n6s300_driver/out/joint_torques and /j2n6s300_driver/in/joint_torque .

So, I got the parameters estimation and I put them on the corresponding file (I put the safety factor = 1). Then, I follow the next commands

I lunch the API

roslaunch kinova_bringup kinova_robot.launch kinova_robotType:=j2n6s300 use_urdf:=true

I set the parameters obtained by the algorithm

rosservice call /j2n6s300_driver/in/set_torque_control_parameters

Switching to Torque control

rosservice call /j2n6s300_driver/in/set_torque_control_mode "state: 1"

Measurements of the Torque sensor (N*m, according to the documentation)

rostopic echo -c /j2n6s300_driver/out/joint_torques

I send a torque value to the end effector

rostopic pub -r 100 /j2n6s300_driver/in/joint_torque kinova_msgs/JointTorque "{joint1: 0.0, joint2: 0.0, joint3: 0.0, joint4: 0.0, joint5: 0.0, joint6: 1.0}"

and I get the Torque inputs through (N*m, according to the documentation),

rostopic echo -c /j2n6s300_driver/in/joint_torque

The thing is that the measurement of /j2n6s300_driver/out/joint_torques do not correspond to the torque inputs I'm asking for (joint1: 0.0, joint2: 0.0, joint3: 0.0, joint4: 0.0, joint5: 0.0, joint6: 1.0). The joint6 goes maximum until 0.1 and the sound that the motor does is like trying to speed and then breaking and reaping this until I give up. I try to do the same experiment with another actuator and its quite the same behavior.

I believe there is something that is not letting speed faster the motor and also that maybe I'm not reading the good function?

Before doing this tests, for sure I did the calibration of the Torque sensors as it is written on the documentation

Best regards,

Betancourt20 commented 1 year ago

Hi, Maybe with some plots it is gonna be better.

First, for the Joint1

joint1withpos

joint1withoutpos

For joint6

joint6withpos

joint6withoutpos

So, now a have a few questions....

am I sending torque inputs with /j2n6s300_driver/in/joint_torque kinova_msgs/JointTorque ? it seems like it is trying to control the joint velocity but not sure about it.

is there a way to obtain an updated cotrol scheme of the law controller that is applied in the DSP? Should I change some parameters in order to have a better performance ? (DSP parameters)

Thanks in advance

felixmaisonneuve commented 1 year ago

Hi @Betancourt20,

This is quite an advanced topic, so I will try to help you as best as I can.

Torque commands are sent correctly to the actuators. The noise you see is due to the PID tuning inside the actuator. That is just how it is. This is how the motor works. You could try to change the PIDs, but is not recommanded and it will void any garanty because it could create some serious damage on the arm. I would avoid that except if you absolutely know what you are doing (and even then, I would not recommand it).

Torque stays close to 0 because there is nothing to hold the actuator back. Have tried applying torque on the actuator (forcing against the rotation to keep the actuator in place)? If you do this, you should see the torque staying close to the command you send (1Nm and 4Nm in your examples). You are letting the actuator move freely, so it is normal the torque measures are staying close to 0.

Keep in mind the Jaco2 arm is not very precise and was not disigned for such advanced usage, so you will experience some imprecision in velocity and torque measurements/tracking.

I will link you these two other issues where similar topics were discussed : #202, #381

Hope this helps Felix