Skip to content

Trajectory File

Supports trajectory file management, including operations such as querying, running, deleting, and saving.

Query Trajectory List rm_get_trajectory_file_list()

  • Method prototype:
python
rm_get_trajectory_file_list(self, page_num: int, page_size: int, vague_search: str) -> tuple[int, dict[str, any]]:
  • Parameter description:
ParameterTypeDescription
page_numintPage number.
page_sizeintNumber of items per page.
vague_searchstrVague search.
  • Return value:

tuple[int,dict[str,any]]: A tuple containing two elements.

  1. int: The status code of the function execution:

    ParameterTypeDescriptionHandling Suggestions
    0intSuccess.-
    1intThe controller returns false, indicating that the parameters are sent incorrectly or the robotic arm state is wrong.- Validate JSON Command:
    ① Enable DEBUG logs for the API to capture the raw JSON data.
    ② Check JSON syntax: Ensure correct formatting of parentheses, quotes, commas, etc. (You can use a JSON validation tool).
    ③ Verify against the API documentation that parameter names, data types, and value ranges comply with the specifications.
    ④ After fixing the issues, resend the command and check if the controller returns a normal status code and business data.
    - Check Robot Arm Status:
    ① Check for real-time error messages in the robot arm controller or logs (such as hardware failures, over-limit conditions), and reset, calibrate, or troubleshoot hardware issues according to the prompts.
    ② After fixing the issues, resend the command and check if the controller returns a normal status code and business data.
    -1intThe data transmission fails, indicating that a problem occurs during the communication.Check Network Connectivity:
    Use tools like ping/telnet to check if the communication link with the controller is normal.
    -2intThe data reception fails, indicating that a problem occurs during the communication, or the controller has a return timeout.- Check Network Connectivity:
    Use tools like ping/telnet to check if the communication link with the controller is normal.
    - Verify Version Compatibility:
    ① Check if the controller firmware version supports the current API functions. For specific version compatibility, refer to the Version Description.
    ② If the version is too low, upgrade the controller or use an API version that is compatible.
    -3intThe return value parse fails, indicating that the received data format is incorrect or incomplete.Verify Version Compatibility:
    ① Check if the controller firmware version supports the current API functions. For specific version compatibility, refer to the Version Description.
    ② If the version is too low, upgrade the controller or use an API version that is compatible.
    -4intThis interface is not supported by the Gen 3 Controller.-
  2. dict[str,any]: The list of drag and teach trajectories:

    ParameterTypeDescription
    -dict[str,any]A dictionary of the drag - and - teach trajectory list that meets the conditions, with keys being the field names of the rm_trajectory_list_t structure.

    Jump to rm_trajectory_list_t for details of the structure.

  • Usage demo
python
from Robotic_Arm.rm_robot_interface import *
# Instantiate the RoboticArm class
arm = RoboticArm(rm_thread_mode_e.RM_TRIPLE_MODE_E)

# Create the robotic arm connection and print the connection ID
handle = arm.rm_create_robot_arm("192.168.1.18", 8080)
print(handle.id)

# Query the list of drag teach trajectories
print(arm.rm_get_trajectory_file_list(1,10,"test"))

arm.rm_delete_robot_arm()

Start Running Specified Trajectory rm_set_run_trajectory()

  • Method prototype:
python
rm_set_run_trajectory(self, trajectory_name: str) -> int:
  • Parameter description:
ParameterTypeDescription
trajectory_namestrThe name of the drag and teach trajectory.
  • Return value:

The status code of the function execution:

ParameterTypeDescriptionHandling Suggestions
0intSuccess.-
1intThe controller returns false, indicating that the parameters are sent incorrectly or the robotic arm state is wrong.- Validate JSON Command:
① Enable DEBUG logs for the API to capture the raw JSON data.
② Check JSON syntax: Ensure correct formatting of parentheses, quotes, commas, etc. (You can use a JSON validation tool).
③ Verify against the API documentation that parameter names, data types, and value ranges comply with the specifications.
④ After fixing the issues, resend the command and check if the controller returns a normal status code and business data.
- Check Robot Arm Status:
① Check for real-time error messages in the robot arm controller or logs (such as hardware failures, over-limit conditions), and reset, calibrate, or troubleshoot hardware issues according to the prompts.
② After fixing the issues, resend the command and check if the controller returns a normal status code and business data.
-1intThe data transmission fails, indicating that a problem occurs during the communication.Check Network Connectivity:
Use tools like ping/telnet to check if the communication link with the controller is normal.
-2intThe data reception fails, indicating that a problem occurs during the communication, or the controller has a return timeout.- Check Network Connectivity:
Use tools like ping/telnet to check if the communication link with the controller is normal.
- Verify Version Compatibility:
① Check if the controller firmware version supports the current API functions. For specific version compatibility, refer to the Version Description.
② If the version is too low, upgrade the controller or use an API version that is compatible.
-3intThe return value parse fails, indicating that the received data format is incorrect or incomplete.Verify Version Compatibility:
① Check if the controller firmware version supports the current API functions. For specific version compatibility, refer to the Version Description.
② If the version is too low, upgrade the controller or use an API version that is compatible.
-4intThis interface is not supported by the Gen 3 Controller.-
  • Usage demo
python
from Robotic_Arm.rm_robot_interface import *
# Instantiate the RoboticArm class
arm = RoboticArm(rm_thread_mode_e.RM_TRIPLE_MODE_E)

# Create the robotic arm connection and print the connection ID
handle = arm.rm_create_robot_arm("192.168.1.18", 8080)
print(handle.id)

# Run the specified drag teach trajectory
print(arm.rm_set_run_trajectory("test"))

arm.rm_delete_robot_arm()

Delete Specified Trajectory File rm_delete_trajectory_file()

  • Method prototype:
python
rm_delete_trajectory_file(self, trajectory_name: str) -> int:
  • Parameter description:
ParameterTypeDescription
trajectory_namestrThe name of the drag and teach trajectory.
  • Return value:

The status code of the function execution:

ParameterTypeDescriptionHandling Suggestions
0intSuccess.-
1intThe controller returns false, indicating that the parameters are sent incorrectly or the robotic arm state is wrong.- Validate JSON Command:
① Enable DEBUG logs for the API to capture the raw JSON data.
② Check JSON syntax: Ensure correct formatting of parentheses, quotes, commas, etc. (You can use a JSON validation tool).
③ Verify against the API documentation that parameter names, data types, and value ranges comply with the specifications.
④ After fixing the issues, resend the command and check if the controller returns a normal status code and business data.
- Check Robot Arm Status:
① Check for real-time error messages in the robot arm controller or logs (such as hardware failures, over-limit conditions), and reset, calibrate, or troubleshoot hardware issues according to the prompts.
② After fixing the issues, resend the command and check if the controller returns a normal status code and business data.
-1intThe data transmission fails, indicating that a problem occurs during the communication.Check Network Connectivity:
Use tools like ping/telnet to check if the communication link with the controller is normal.
-2intThe data reception fails, indicating that a problem occurs during the communication, or the controller has a return timeout.- Check Network Connectivity:
Use tools like ping/telnet to check if the communication link with the controller is normal.
- Verify Version Compatibility:
① Check if the controller firmware version supports the current API functions. For specific version compatibility, refer to the Version Description.
② If the version is too low, upgrade the controller or use an API version that is compatible.
-3intThe return value parse fails, indicating that the received data format is incorrect or incomplete.Verify Version Compatibility:
① Check if the controller firmware version supports the current API functions. For specific version compatibility, refer to the Version Description.
② If the version is too low, upgrade the controller or use an API version that is compatible.
-4intThis interface is not supported by the Gen 3 Controller.-
  • Usage demo
python
from Robotic_Arm.rm_robot_interface import *
# Instantiate the RoboticArm class
arm = RoboticArm(rm_thread_mode_e.RM_TRIPLE_MODE_E)

# Create the robotic arm connection and print the connection ID
handle = arm.rm_create_robot_arm("192.168.1.18", 8080)
print(handle.id)

# Delete the trajectory file
print(arm.rm_delete_trajectory_file("test"))

arm.rm_delete_robot_arm()

Save Trajectory File rm_save_trajectory_file()

  • Method prototype:
python
rm_save_trajectory_file(self, trajectory_name: str) -> int:
  • Parameter description:
ParameterTypeDescription
trajectory_namestrThe name of the drag and teach trajectory.
  • Return value:

The status code of the function execution:

ParameterTypeDescriptionHandling Suggestions
0intSuccess.-
1intThe controller returns false, indicating that the parameters are sent incorrectly or the robotic arm state is wrong.- Validate JSON Command:
① Enable DEBUG logs for the API to capture the raw JSON data.
② Check JSON syntax: Ensure correct formatting of parentheses, quotes, commas, etc. (You can use a JSON validation tool).
③ Verify against the API documentation that parameter names, data types, and value ranges comply with the specifications.
④ After fixing the issues, resend the command and check if the controller returns a normal status code and business data.
- Check Robot Arm Status:
① Check for real-time error messages in the robot arm controller or logs (such as hardware failures, over-limit conditions), and reset, calibrate, or troubleshoot hardware issues according to the prompts.
② After fixing the issues, resend the command and check if the controller returns a normal status code and business data.
-1intThe data transmission fails, indicating that a problem occurs during the communication.Check Network Connectivity:
Use tools like ping/telnet to check if the communication link with the controller is normal.
-2intThe data reception fails, indicating that a problem occurs during the communication, or the controller has a return timeout.- Check Network Connectivity:
Use tools like ping/telnet to check if the communication link with the controller is normal.
- Verify Version Compatibility:
① Check if the controller firmware version supports the current API functions. For specific version compatibility, refer to the Version Description.
② If the version is too low, upgrade the controller or use an API version that is compatible.
-3intThe return value parse fails, indicating that the received data format is incorrect or incomplete.Verify Version Compatibility:
① Check if the controller firmware version supports the current API functions. For specific version compatibility, refer to the Version Description.
② If the version is too low, upgrade the controller or use an API version that is compatible.
-4intThis interface is not supported by the Gen 3 Controller.-
  • Usage demo
python
from Robotic_Arm.rm_robot_interface import *
# Instantiate the RoboticArm class
arm = RoboticArm(rm_thread_mode_e.RM_TRIPLE_MODE_E)

# Create the robotic arm connection and print the connection ID
handle = arm.rm_create_robot_arm("192.168.1.18", 8080)
print(handle.id)

# Save the trajectory file
print(arm.rm_save_trajectory_file("test"))

arm.rm_delete_robot_arm()