Breadcrumbs

overwrite_user_cart_coord()

Definition

overwrite_user_cart_coord(id, pos, ref, apply_mod)

Features

This function changes the pose and reference coordinate system of the requested user coordinate system [id] with the [pos] and [ref], respectively.

Parameters

Parameter Name

Data Type

Default Value

Description

id

int

-

coordinate ID

pos

posx

list (float[6])

-

posx or

position list

ref

int

DR_BASE

reference coordinate

  • DR_BASE: base coordinate

  • DR_WORLD: world coordinate

apply_mod

int

DR_TEMPORARY

DR_TEMPORARY(0) : Valid only during program execution DR_PERMANENT(1) : Valid even after program ends

Note

If apply_mod is 0, the user coordinate system is changed and maintained only when the program is executed, and if it is 1, the user coordinate system information stored in the host controller itself is changed.

Return

Value

Description

Positive integer

Successful coordinate setting
Set coordinate ID (101 - 200)

-1

Failed coordinate setting

Exception

Exception

Description

DR_Error (DR_ERROR_TYPE)

Parameter data type error occurred

DR_Error (DR_ERROR_VALUE)

Parameter value is invalid

DR_Error (DR_ERROR_RUNTIME)

C extension module error occurred

DR_Error (DR_ERROR_STOP)

Program terminated forcefully

Example

Python
pose_user1 = posx(30, 40, 50, 0, 0, 0)
id_user = set_user_cart_coord(pose_user1, ref=DR_BASE)
pose_user2 = posx(100, 150, 200, 45, 180, 0)
overwrite_user_cart_coord(id_user, pose_user2, ref=DR_BASE)
pose_user3 = posx(100, 150, 200, 45, 180, 0) 
overwrite_user_cart_coord(id_user, pose_user3, ref=DR_BASE, apply_mod=DR_PERMANENT)