Skip to content

Global Waypoint Management GlobalWaypointManage

It is used to add, query, or update global waypoints. The following is a detailed description of the member functions of the global waypoint management GlobalWaypointManage, including the method prototype, parameter description, return value, and usage demo.

Add global waypointsrm_add_global_waypoint()

  • Method prototype:
python
rm_add_global_waypoint(self, waypoint: rm_waypoint_t) -> int:

Jump to rm_waypoint_t for details of the structure

  • Parameter description:
ParameterTypeDescription
waypointrm_waypoint_tAdd global waypoint parameters (the time for adding the waypoint is not required).
  • Return value: State codes executed by functions:
ParameterTypeDescription
0intSuccess.
1intThe controller returns false, indicating that the parameters are sent incorrectly or the robotic arm state is wrong.
-1intThe data transmission fails, indicating that a problem occurs during the communication.
-2intThe data reception fails, indicating that a problem occurs during the communication, or the controller has a return timeout.
-3intThe return value parse fails, indicating that the received data format is incorrect or incomplete.
  • 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)

point = rm_waypoint_t("point1", [0, 20, 70, 0, 90, 0],
                      [0.3, 0, 0.3, 3.142, 0, 0], 'World', 'Arm_Tip')
print(arm.rm_add_global_waypoint(point))

arm.rm_delete_robot_arm()

Update global waypointsrm_update_global_waypoint()

  • Method prototype:
python
rm_update_global_waypoint(self, waypoint: rm_waypoint_t) -> int:

Jump to rm_waypoint_t for details of the structure

  • Parameter description:
ParameterTypeDescription
waypointrm_waypoint_tUpdate global waypoint parameters (the time for updating the waypoint is not required).
  • Return value: State codes executed by functions
ParameterTypeDescription
0intSuccess.
1intThe controller returns false, indicating that the parameters are sent incorrectly or the robotic arm state is wrong.
-1intThe data transmission fails, indicating that a problem occurs during the communication.
-2intThe data reception fails, indicating that a problem occurs during the communication, or the controller has a return timeout.
-3intThe return value parse fails, indicating that the received data format is incorrect or incomplete.
  • 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)

point = rm_waypoint_t("point1", [0, 40, 50, 0, 90, 0],[0.3, 0, 0.3, 3.142, 0, 0], 'World', 'Arm_Tip')
print(arm.rm_update_global_waypoint(point))

arm.rm_delete_robot_arm()

Delete global waypointsrm_delete_global_waypoint()

  • Method prototype:
python
rm_delete_global_waypoint(self, point_name: str) -> int:
  • Parameter description:
ParameterTypeDescription
point_namestrName of the global waypoint.
  • Return value: State codes executed by functions:
ParameterTypeDescription
0intSuccess.
1intThe controller returns false, indicating that the parameters are sent incorrectly or the robotic arm state is wrong.
-1intThe data transmission fails, indicating that a problem occurs during the communication.
-2intThe data reception fails, indicating that a problem occurs during the communication, or the controller has a return timeout.
-3intThe return value parse fails, indicating that the received data format is incorrect or incomplete.
  • 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)

print(arm.rm_delete_global_waypoint("point"))

arm.rm_delete_robot_arm()

Query given global waypointsrm_get_given_global_waypoint()

  • Method prototype:
python
rm_get_given_global_waypoint(self, point_name: str) -> tuple[int, dict[str, any]]:
  • Parameter description:
ParameterTypeDescription
point_namestrName of the given global waypoint.
  • Return value:tuple[int, dict[str,any]]: a tuple containing two elements
  1. int: state codes executed by functions.
ParameterTypeDescription
0intSuccess.
1intThe controller returns false, indicating that the parameters are sent incorrectly or the robotic arm state is wrong.
-1intThe data transmission fails, indicating that a problem occurs during the communication.
-2intThe data reception fails, indicating that a problem occurs during the communication, or the controller has a return timeout.
-3intThe return value parse fails, indicating that the received data format is incorrect or incomplete.
  1. Dictionary of global waypoint parameters
ParameterTypeDescription
rm_waypoint_tdict[str,any]Return the dictionary of given global waypoint parameters, key: field name of rm_waypoint_t.
  • 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)

print(arm.rm_get_given_global_waypoint("point"))

arm.rm_delete_robot_arm()

Query multiple global waypointsrm_get_global_waypoints_list()

  • Method prototype:
python
rm_get_global_waypoints_list(self, page_num: int, page_size: int, vague_search: str) -> tuple[int, dict[str, any]]:
  • Parameter description:
ParameterTypeDescription
point_namestrName of the given global waypoint.
  • Return value:tuple[int,dict[str,any]]: a tuple containing two elements.
  1. int: state codes executed by functions.
ParameterTypeDescription
0intSuccess.
1intThe controller returns false, indicating that the parameters are sent incorrectly or the robotic arm state is wrong.
-1intThe data transmission fails, indicating that a problem occurs during the communication.
-2intThe data reception fails, indicating that a problem occurs during the communication, or the controller has a return timeout.
-3intThe return value parse fails, indicating that the received data format is incorrect or incomplete.
  1. Dictionary of the global waypoint list
ParameterTypeDescription
rm_waypoint_list_tdict[str,any]Return the dictionary of the conforming global waypoint list, key: field name of rm_waypoint_list_t
  • 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)

# Search “test” waypoints vaguely
print(arm.rm_get_global_waypoints_list(1, 10, "test"))

arm.rm_delete_robot_arm()