Using FT300 sensor to detect contact with a surface

Hi, we are researchers looking at social touch and we recently acquired the xarm6 as well as the FT300 sensor from thebotshop alongside with the GUI that mybotshop has kindly come up with to interface with the robot. I am playing around with the GUI at the moment and trying out the force control at the moment. However, besides administering a force, I would also like to be able to detect contact with a surface via the force sensor and send out a voltage output upon detection of the contact. I just have a few questions when figuring out how that should work:

  1. Based on the scripts in src → third_party → robotiq → robotiq_ft_sensor, the script is in C ++, are there any python wrapper libraries for the robotiq sensor?

  2. The GUI seemed to allow for control force exerted where we feed in the force information, however, if I would like to detect certain force threshold, what would be your recommendations in doing that?

On another note, there’s a record trajectory and play trajectory in the GUI. Could I check on how that would work as I tried recording the trajectory, saving it and thereafter playing it but the play trajectory does not seem to work?

Thank you!

Xiaoqin

Dear @xqcheng,

I think my colleague can help you with this. @Tahir please take a look!

Hi! Just as a follow up question, could I also check on the following when doing robot operation and force control?

  1. What does error scale and goal tolerance affects in the force control?
  2. Either velocity control or compliance control can be activated during the robot operation. Based on my understanding of compliance control, does that read in the target velocity and acceleration set by the GUI and also implicitly control for velocity of the robot?
  3. Related to my previous thread, how do we go about using the configurable digital input and output on the control box?

Thank you and so sorry for the multiple questions!

Best Regards,
Xiaoqin

Hi @xqcheng,

First of all, I would like to mention here all the documentation for original sensors/actuators is relevant. We develop on top of that. You can of course look into that as well. For example for XARM6 the relevant repo is their ROS driver, for Robotiq FT300 here is the ROS driver.

  1. Based on the scripts in src → third_party → robotiq → robotiq_ft_sensor, the script is in C ++, are there any python wrapper libraries for the robotiq sensor?

As all the drivers are ROS dependent. You can write a Python ROS node to subscribe to the relevant topic from the Force Torque sensor. For example in a shell you can do the following:


rostopic list # to check all the topics currently in the environment.
# you can find the relevant topics name for the force torque sensor, for example 'ft_sensor_wrench' is from the ROS driver for FT300.
rostopic echo topic_name # e.g. ft_sensor_wrench to see the content of the topic.

You can see more about ros topics and subscriber here

  1. The GUI seemed to allow for control force exerted where we feed in the force information, however, if I would like to detect a certain force threshold, what would be your recommendations in doing that?

Again the answer to the above question is relevant here. You can subscribe to force information topic and do thresholding on the values in your script. In case you would like to have this in GUI, just let me know.

On another note, there’s a record trajectory and play trajectory in the GUI. Could I check on how that would work as I tried recording the trajectory, saving it and thereafter playing it but the play trajectory does not seem to work?

Recording and playing back trajectory is something from XARM ROS driver, it has nothing to do with Compliance Control. You can see more information here.

Sometimes you have to 2/3 times on follow trajectory button to follow.

  1. What does error scale and goal tolerance affects in the force control?

Error scale actually penalizes the error for the control loop for arm and force-torque sensor value. With a high error_scale the system will be more responsive to the change of force on the force torque sensor. On the other hand goal tolerance makes sure the arm moves to the goal position within some tolerance. You might have noticed that the arm’s end effector adjusts its position when you activate the compliance control. This is because the compliance controller tries to optimize the end effector position, force torque sensor values and the end goal in case you start the waypoints controller.

  1. Either velocity control or compliance control can be activated during the robot operation. Based on my understanding of compliance control, does that read in the target velocity and acceleration set by the GUI and also implicitly control for velocity of the robot?

As in the above answered mentioned compliance control optimizes several constraints from arm, force torque sensor, waypoints and velocity so end motion of the arm will be dependent upon all these optimizations.

  1. Related to my previous thread, how do we go about using the configurable digital input and output on the control box?

You can directly use the IOs of the control box and see their values in xarm/controller_gpio_states topic. More on this in xarm_ros driver.