Skip to content

Force Sensor Command Set (Optional)

6-DoF force

The 6-DoF force version of the RealMan robotic arm is equipped with an integrated 6-DoF force sensor, eliminating the need for external wiring and allowing the user to manipulate the 6-DoF force sensor and get 6-DoF force data directly through the protocol.

As shown in the image below, the Z-axis of the 6-DoF force is directly above, and the Y-axis of the 6-DoF force is in the opposite direction of the aviation connector, with the frame following the right-hand rule. When the robotic arm is in the zero pose, the tool frame is aligned with the 6-DoF force frame.

Additionally, the 6-DoF force sensor has a rated force of 200 N, a rated torque of 8 N.m, an overload capacity of 300%FS, an operating temperature range of 5°C to 80°C, and an accuracy of ±2%FS. During use, it is important to follow the operational requirements to prevent damage to the 6-DoF force sensor.

sixForce

Get the 6-DoF force data get_force_data

Get the current force and torque data obtained from the 6-DoF force sensor: Fx, Fy, Fz, Mx, My, and Mz.

  • Input parameter
ParameterTypeDescription
get_force_datastringGet the force sensor data.
  • Code demo

Input

json
{"command":"get_force_data"}

Output

Original force data force_data
Fx=1 N, Fy=2 N, Fz=3 N, Mx=0.4 N.m, My=0.5 N.m, Mz=0.6 N.m;

External force data in the sensor frame zero_force_data
Fx=0.5 N, Fy=1 N, Fz=1.5 N, Mx=0.2 N.m, My=0.25 N.m, Mz=0.3 N.m;

External force data in the current work frame work_zero_force_data
Fx=0.5 N, Fy=1 N, Fz=1.5 N, Mx=0.2 N.m, My=0.25 N.m, Mz=0.3 N.m;

External force data in the current tool frame tool_zero_force_data
Fx=0.5 N, Fy=1 N, Fz=1.5 N, Mx=0.2 N.m, My=0.25 N.m, Mz=0.3 N.m;

Data accuracy: 0.001.

json
{
    "command": "get_force_data",
    "force_data": [
        1000,
        2000,
        3000,
        400,
        500,
        600
    ],
    "zero_force_data": [
        500,
        1000,
        1500,
        200,
        250,
        300
    ],
    "work_zero_force_data": [
        500,
        1000,
        1500,
        200,
        250,
        300
    ],
    "tool_zero_force_data": [
        500,
        1000,
        1500,
        200,
        250,
        300
    ]
}

Clear the 6-DoF force data clear_force_data

Clear the 6-DoF force data and calibrate the zero position in the current state.

  • Input parameter
ParameterTypeDescription
clear_force_datastringCalibrate the zero position in the current state.
  • Code demo

Input

json
{"command":"clear_force_data"}

Output

Clearing succeeded:

json
{
    "command": "clear_force_data",
    "clear_state": true
}

Clearing failed:

json
{
    "command": "clear_force_data",
    "clear_state": false
}

Set the 6-DoF force center of gravity automatically set_force_sensor

Set the 6-DoF force center of gravity. After reinstalling the 6-DoF force sensor, the initial force and center of gravity acting on the 6-DoF force sensor must be recalculated. Get the 6-DoF force data at different orientations to calculate the center of gravity. After this command is issued, the robotic arm moves to each calibration point at a fixed speed. This process must not be interrupted. Otherwise, the calibration must be restarted.

TIP

Calibration must be performed while the robotic arm is stationary. Take the RM65 robotic arm as an example, the joint angles for the four calibration points are as follows: Pose 1 joint angle: {0,0,-60,0,60,0} Pose 2 joint angle: {0,0,-60,0,-30,0} Pose 3 joint angle: {0,0,-60,0,-30,180} Pose 4 joint angle: {0,0,-60,0,-120,0}

  • Input parameter
ParameterTypeDescription
set_force_sensorstringSet the force sensor data at the given position.
  • Code demo

Input

json
{"command":"set_force_sensor"}

Output Setting succeeded:

json
{
    "command": "set_force_sensor",
    "set_state": true
}

Setting failed:

json
{
    "command": "set_force_sensor",
    "set_state": false
}

Calibrate the 6-DoF force data manually manual_set_force

Set the 6-DoF force center of gravity. After reinstalling the 6-DoF force sensor, the initial force and center of gravity acting on the 6-DoF force sensor must be recalculated. This manual calibration is applicable to narrow working spaces to prevent the robotic arm from colliding during the automatic calibration. Users can manually select four poses to issue commands. Once all four poses are set, the robotic arm will automatically move toward the user-defined target, and the 6-DoF force center of gravity will be calculated during this movement.

  • Input parameter
ParameterTypeDescription
manual_set_forcestringCalibrate the center of gravity of the force sensor.
pose1intPose 1 joint angle.
pose2intPose 2 joint angle.
pose3intPose 3 joint angle.
pose4intPose 4 joint angle.

WARNING

The commands for four poses must be issued in sequence. Once pose 4 is set, the robotic arm will automatically calculate the center of gravity, and return the value after the calculation is complete.

  • Code demo

Input 6-DoF robotic arm:

json
 {"command":"manual_set_force_pose1","joint":[0,0,0,0,90000,0]}

7-DoF robotic arm:

json
{"command":"manual_set_force_pose1","joint":[0,0,0,0,0,90000,0]}

Output Calibration succeeded:

json
{
    "command": "set_force_sensor",
    "set_state": true
}

Calibration failed:

json
{
    "command": "set_force_sensor",
    "set_state": false
}

Stop calibrating the center of gravity of the force sensor stop_set_force_sensor

During the calibration of the force sensor, if an unexpected event occurs, send this command to stop the robotic arm's movement and exit the calibration process.

  • Input parameter
ParameterTypeDescription
stop_set_force_sensorstringStop calculating the center of gravity of the force sensor.
  • Code demo

Input

json
{"command":"stop_set_force_sensor"}

Output Calculation succeeded:

json
{
    "command": "stop_set_force_sensor",
    "stop_state": true
}

Calculation failed:

json
{
    "command": "stop_set_force_sensor",
    "stop_state": false
}