Skip to content

Electronic Fence Parameter Structure rm_fence_config_t ​

Constructor function ​

Python
rm_fence_config_t(form=0, name='', cube=None, plane=None, sphere=None)

Parameter initialization:

AttributeTypeDescription
formint, optionalShape, 1: cuboid; 2: point-vector plane; 3: sphere. Default 0; fill in 2 when configuring a plane.
namestr, optionalGeometric model name, default empty string. When adding a saved model, fill in no more than 10 bytes of letters, digits or underscores as required by the corresponding interface; no name is needed when setting the current fence parameters.
cuberm_fence_config_cube_t, optionalCuboid parameters, default None.
planerm_fence_config_plane_t, optionalPlane parameters defined by three points, coordinate unit m, default None. Used when form=2.
sphererm_fence_config_sphere_t, optionalSphere parameters, default None. The supported shape range depends on the corresponding controller and interface.

Return value:

Creates an rm_fence_config_t configuration object. Constructing the object does not send any configuration and does not return a controller execution status code.

Usage demo:

python
from Robotic_Arm.rm_robot_interface import (
    rm_fence_config_t, rm_fence_config_plane_t,
)

# Three non-collinear points, unit m:
# (0, 0, 0.4), (0.5, 0, 0.4), (0, 0.5, 0.4).
plane_points = rm_fence_config_plane_t(
    0.0, 0.0, 0.4,
    0.5, 0.0, 0.4,
    0.0, 0.5, 0.4,
)
config = rm_fence_config_t(form=2, plane=plane_points)
print(config.to_dict())

Member function ​

Python
rm_ctypes_wrap.rm_fence_config_t.to_dict(self)