lebai-motion-control  3.1.6
lebai motion control C interface
Data Structures | Typedefs | Enumerations | Functions
robot_model

Robot model module. More...

Data Structures

struct  lmc_link_dh_config
 DH parameter for a link. More...
 
struct  lmc_link_dyn_config
 Dynamic parameter for a link. More...
 
struct  lmc_link_config
 Overall parameter for a single link,. More...
 
struct  lmc_robot_model_config
 Overall parameters for a robot model. More...
 
struct  lmc_tool_payload
 Tool payload data. More...
 

Typedefs

typedef struct lmc_robot_model lmc_robot_model_t
 Robot model data structure. More...
 
typedef enum lmc_robot_model_struct lmc_robot_model_struct_t
 Enum robot model structure type. The following table shows supported structure currently.

Enum value Description
STRUCT_TYPE_61 6 joint manipulator type(lm3 like).
STRUCT_TYPE_51 5 joint manipulator type(lm3 without the last joint).
More...
 
typedef struct lmc_link_dh_config lmc_link_dh_config_t
 DH parameter for a link. More...
 
typedef struct lmc_link_dyn_config lmc_link_dyn_config_t
 Dynamic parameter for a link. More...
 
typedef struct lmc_link_config lmc_link_config_t
 Overall parameter for a single link,. More...
 
typedef struct lmc_robot_model_config lmc_robot_model_config_t
 Overall parameters for a robot model. More...
 
typedef struct lmc_tool_payload lmc_tool_payload_t
 Tool payload data. More...
 

Enumerations

enum  lmc_robot_model_struct { STRUCT_TYPE_61, STRUCT_TYPE_51, STRUCT_TYPE_5A }
 Enum robot model structure type. The following table shows supported structure currently.

Enum value Description
STRUCT_TYPE_61 6 joint manipulator type(lm3 like).
STRUCT_TYPE_51 5 joint manipulator type(lm3 without the last joint).
More...
 

Functions

lmc_robot_model_tlmc_rm_new ()
 Create a robot model instance. More...
 
void lmc_rm_delete (lmc_robot_model_t **robot_model_addr)
 Delete a robot model instance. More...
 
int lmc_rm_init (lmc_robot_model_t *const robot_model, lmc_robot_model_config_t const *const robot_model_config, lmc_robot_model_struct_t struct_type)
 Init a robot model using lmc_robot_model_config_t. More...
 
size_t lmc_rm_joint_dof (lmc_robot_model_t const *const robot_model)
 Get the joint DOF of robot model. More...
 
lmc_link_dh_config_tlmc_rm_get_mdh (lmc_robot_model_t const *const robot_model, size_t *const size, lmc_link_dh_config_t *const params)
 Get modified dh params. More...
 
int lmc_rm_set_tool_payload (lmc_robot_model_t const *const robot_model, lmc_tool_payload_t const *const payload)
 Set tool payload, will affect all the dynamic algorithms. More...
 
int lmc_rm_set_tcp_transform (lmc_robot_model_t const *const robot_model, lmc_transform_t const *const t)
 Set tcp transform, will affect the kinematic, the internal dyn param will try to recaculate by itself. More...
 

Detailed Description

Robot model module.

Typedef Documentation

Overall parameter for a single link,.

Note
Same as segment_t in lebai_kdl.

DH parameter for a link.

Note
Same as dh_t in lebai_kdl.

Dynamic parameter for a link.

Note
Same as d_param_t in lebai_kdl.

Overall parameters for a robot model.

Note
Same as KDL_t, but remove kp kv gravity.

Enum robot model structure type. The following table shows supported structure currently.

Enum value Description
STRUCT_TYPE_61 6 joint manipulator type(lm3 like).
STRUCT_TYPE_51 5 joint manipulator type(lm3 without the last joint).

Note
typedef struct lmc_robot_model lmc_robot_model_t

Robot model data structure.

The details of this data structure is hidden in c files. We do not use the structure member directly, try to use the API.

Definition at line 31 of file lmc_robot_model.h.

Tool payload data.

Note
Same as payload_t in lebai_kdl.

Enumeration Type Documentation

Enum robot model structure type. The following table shows supported structure currently.

Enum value Description
STRUCT_TYPE_61 6 joint manipulator type(lm3 like).
STRUCT_TYPE_51 5 joint manipulator type(lm3 without the last joint).

Note
Enumerator
STRUCT_TYPE_61 

6 joint lm3 like manipulator

STRUCT_TYPE_51 

5 joint manipulator

STRUCT_TYPE_5A 

5 joint machine

Definition at line 41 of file lmc_robot_model.h.

Function Documentation

void lmc_rm_delete ( lmc_robot_model_t **  robot_model_addr)

Delete a robot model instance.

Note
The robot_model_addr pointer will be set to NULL.
Parameters
[in]robot_model_addrThe address of the robot_model pointer.
Examples:
example_robot_model.cc, and example_tg.cc.
lmc_link_dh_config_t* lmc_rm_get_mdh ( lmc_robot_model_t const *const  robot_model,
size_t *const  size,
lmc_link_dh_config_t *const  params 
)

Get modified dh params.

Note
Parameters
[in]robot_modelrobot model data.
[out]sizethe size of return mdh array
[out]paramsmodified dh param data.
Returns
modified dh param data.
int lmc_rm_init ( lmc_robot_model_t *const  robot_model,
lmc_robot_model_config_t const *const  robot_model_config,
lmc_robot_model_struct_t  struct_type 
)

Init a robot model using lmc_robot_model_config_t.

Note
In old lebai_kdl library, robot_model init is coupling to tg init.
Parameters
[in]robot_modelrobot model data pointer
[in]robot_model_configrobot model config data pointer.
[in]struct_typerobot model struct type.
Returns
Return 0 on success, otherwise failure.
Examples:
example_robot_model.cc, and example_tg.cc.
size_t lmc_rm_joint_dof ( lmc_robot_model_t const *const  robot_model)

Get the joint DOF of robot model.

Note
Parameters
[in]robot_modelrobot model data with type lmc_robot_model_t
Returns
joint DOF of robot model.
lmc_robot_model_t* lmc_rm_new ( )

Create a robot model instance.

Note
Robot model is a data structure contains kinematics and dynamics info. It's a core data structure to many algorithms. Robot model must be init by calling lmc_rm_init before any usage.
Examples:
example_robot_model.cc, and example_tg.cc.
int lmc_rm_set_tcp_transform ( lmc_robot_model_t const *const  robot_model,
lmc_transform_t const *const  t 
)

Set tcp transform, will affect the kinematic, the internal dyn param will try to recaculate by itself.

Note
Parameters
[in]robot_modelrobot model data.
[in]tCartesian transform data.
Returns
Return 0 on success, otherwise failure.
int lmc_rm_set_tool_payload ( lmc_robot_model_t const *const  robot_model,
lmc_tool_payload_t const *const  payload 
)

Set tool payload, will affect all the dynamic algorithms.

Note
Parameters
[in]robot_modelrobot model data.
[in]payloadpayload data for setting
Returns
Return 0 on success, otherwise failure.