Skip to content
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

Unable to get data from the force toque sensor #148

Closed
nitish3693 opened this issue Nov 14, 2022 · 10 comments
Closed

Unable to get data from the force toque sensor #148

nitish3693 opened this issue Nov 14, 2022 · 10 comments

Comments

@nitish3693
Copy link

We are using the latest version of xarm_ros, and have connected the force sensor according to the manual. When running either the provided xarm6_server.launch, or the realMove_exec.launch, the two uf_ftsensor topics do become available, but there is no data published to them at all. We are not getting any error messages anywhere, and all other functionality works fine.

@nitish3693
Copy link
Author

Also, the firmware and xarm studio version are :

image

When tried xArmStudio-Settings-Tools-Force Torque Sensor we are not able to toggle the Is the 6 Axis Force Torque Sensor Installed tab.

image

@MinnaZhong
Copy link

Hi, please update the firmware to the latest version V1.11.1.

@VFjr
Copy link

VFjr commented Nov 15, 2022

Hi, I am working together with @nitish3693

We have updated the control box firmware to v1.11.1.

The force torque sensor works well when used with uFactory studio, including the manual mode. Here is a screenshot of our current setup:

image

I ran the payload identification procedure.

Then after closing the uFactory Studio, I tried running the following on the most recent version of the xarm_ros:

roslaunch xarm_bringup xarm6_server.launch robot_ip:=192.168.1.212 report_type:=rich
Console Output
extend@extend-LattePanda-Delta:~/ws_force_sensor_test$ roslaunch xarm_bringup xarm6_server.launch robot_ip:=192.168.1.212 report_type:=rich
... logging to /home/extend/.ros/log/5483ac42-6503-11ed-bf65-00e04c018e53/roslaunch-extend-LattePanda-Delta-13266.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://extend-LattePanda-Delta:34803/

SUMMARY
========

PARAMETERS
 * /rosdistro: melodic
 * /rosversion: 1.14.13
 * /xarm/DOF: 6
 * /xarm/add_gripper: False
 * /xarm/baud_checkset: True
 * /xarm/default_gripper_baud: 2000000
 * /xarm/enforce_limits: True
 * /xarm/joint_names: ['joint1', 'joint...
 * /xarm/uf_model: XARM
 * /xarm/velocity_control: False
 * /xarm/xarm_report_type: rich
 * /xarm/xarm_robot_ip: 192.168.1.212

NODES
  /xarm/
    uf_driver (xarm_api/xarm_driver_node)

auto-starting new master
process[master]: started with pid [13279]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 5483ac42-6503-11ed-bf65-00e04c018e53
process[rosout-1]: started with pid [13293]
started core service [/rosout]
process[xarm/uf_driver-2]: started with pid [13296]
[ INFO] [1668530051.911351629]: namespace: /xarm
[ INFO] [1668530051.916012721]: xarm_driver_node start
SDK_VERSION: 1.11.0
Tcp control connection successful
FIRMWARE_VERSION: v1.11.1, PROTOCOL: V1, DETAIL: 6,6,XI1300,AC1300,v1.11.1
Tcp Report Rich connection successful
[ INFO] [1668530052.256383011]: [TCP STATUS] CONTROL: 1, REPORT: 1
report_data_size: 494, size_is_not_confirm: 0
change prot_flag to 3

The problem now is that it still does not to output the right data. On uf_ft_sensor_raw_data, it outputs some specific values constantly and the values do not change if applying a force to the sensor. On uf_ft_sensor_ext_data, it always outputs zeros. Both topics are published to with a frequency of about 5 Hz.

Output of: rostopic echo /xarm/uf_ftsensor_raw_states
---
header: 
  seq: 118
  stamp: 
    secs: 1668530578
    nsecs: 569126847
  frame_id: "uf_ft_sensor_raw_data"
wrench: 
  force: 
    x: -15.6400003433
    y: 1.94000005722
    z: 22.3999996185
  torque: 
    x: -1.47399997711
    y: -0.638499975204
    z: 0.264499992132
---
header: 
  seq: 119
  stamp: 
    secs: 1668530578
    nsecs: 769775898
  frame_id: "uf_ft_sensor_raw_data"
wrench: 
  force: 
    x: -15.6400003433
    y: 1.94000005722
    z: 22.3999996185
  torque: 
    x: -1.47399997711
    y: -0.638499975204
    z: 0.264499992132
---
header: 
  seq: 120
  stamp: 
    secs: 1668530578
    nsecs: 969882188
  frame_id: "uf_ft_sensor_raw_data"
wrench: 
  force: 
    x: -15.6400003433
    y: 1.94000005722
    z: 22.3999996185
  torque: 
    x: -1.47399997711
    y: -0.638499975204
    z: 0.264499992132
---

Output of: rostopic echo /xarm/uf_ftsensor_ext_states
---
header: 
  seq: 806
  stamp: 
    secs: 1668530213
    nsecs: 518952255
  frame_id: "uf_ft_sensor_ext_data"
wrench: 
  force: 
    x: 0.0
    y: 0.0
    z: 0.0
  torque: 
    x: 0.0
    y: 0.0
    z: 0.0
---
header: 
  seq: 807
  stamp: 
    secs: 1668530213
    nsecs: 719285943
  frame_id: "uf_ft_sensor_ext_data"
wrench: 
  force: 
    x: 0.0
    y: 0.0
    z: 0.0
  torque: 
    x: 0.0
    y: 0.0
    z: 0.0
---
header: 
  seq: 808
  stamp: 
    secs: 1668530213
    nsecs: 919248522
  frame_id: "uf_ft_sensor_ext_data"
wrench: 
  force: 
    x: 0.0
    y: 0.0
    z: 0.0
  torque: 
    x: 0.0
    y: 0.0
    z: 0.0
---

@vimior
Copy link
Contributor

vimior commented Nov 16, 2022

@VFjr
Hi, I have added several torque-related services. The data read by the torque is always 0 and should not be enabled. You can enable it through the service /xarm/ft_sensor_enable

rosservice call /xarm/ft_sensor_enable "{data: 1}"

@nitish3693
Copy link
Author

After making the service call we are able to get data in both the topics.

image

@nitish3693
Copy link
Author

Tried calibrating the force sensor manually , but the service returns 997

image

@VFjr
Copy link

VFjr commented Nov 21, 2022

@vimior

Does the uf_ft_sensor_ext_data topic provide gravity compensation? If yes, how should we provide the calibration parameters?

We have tried using the /xarm/ft_sensor_cali_load service to provide the mass and centroid position we got from payload identification with xArm Studio, but the values in the uf_ft_sensor_ext_data topic was exactly the same afterwards, same as shown in the previous screenshot. When calling the /xarm/ft_sensor_cali_load, we received a ret: 997 return.

@vimior
Copy link
Contributor

vimior commented Nov 22, 2022

@VFjr @nitish3693
The number of parameters of the service ft_sensor_cali_load is 10 (mass, center of mass, offset), which is the result identified on the studio settings -> tools -> torque sensor

@nitish3693
Copy link
Author

nitish3693 commented Nov 25, 2022

@vimior , thanks for the help, we did a test with the updated parameters in the calibration service call.

These are the readings with no force applied externally.

image

The robot position without the force looks like this

MicrosoftTeams-image (1)

Is the reading in the z axis of the force due to the gripper attached. Or should the giver be compensated after the /xarm/ft_sensor_cali_load service call.

Also, what is the unit used for the reading in the force and wrench per axis.

@nitish3693
Copy link
Author

@vimior , thanks for your help, By performing following actions we were able to get the data from the sensor,

  1. Starting the driver using the command roslaunch xarm_bringup xarm6_server.launch robot_ip:=192.168.1.212 report_type:=rich
  2. Then calibrating the sensor using the service call /xarm/ft_sensor_cali_load providing the mass, center of mass and offset
  3. Then enabling the sensor for testing using the service call rosservice call /xarm/ft_sensor_enable "{data: 1}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants