EASY-ROB™ Application Programming Interface
v9.301
|
Method class for access to geometry parameter: Location, polygons, vertices, attributes, etc. More...
#include <ER_CAPI.H>
Static Public Member Functions | |
static ER_DllExport void * | inq_body_group_handle_current (void) |
Get current group handle Depending on cDevice and the current selected geometry. More... | |
static ER_DllExport int | inq_body_group_type_current (void) |
Return current group type of current selected geometry grp_type is one of ROBOT_GRP, TOOL_GRP or BODY_GRP. More... | |
static ER_DllExport int | set_body_group_type (int grp_type) |
Set group type for internal temporary geometry template Parameter grp_type is one of ROBOT_GRP, TOOL_GRP or BODY_GRP. More... | |
static ER_DllExport void * | inq_body_group_handle (int grp_type) |
Return group handle of current Device Parameter grp_type is one of ROBOT_GRP, TOOL_GRP or BODY_GRP. More... | |
static ER_DllExport void * | inq_body_handle_current (void *grp_handle=0) |
Return body handle If parameter grp_handle is 0, the body handle of the current group is returned. More... | |
static ER_DllExport void * | inq_body_handle_byname (void *grp_handle, char *name) |
Return body handle by body name Parameter grp_handle must be valid and not 0Parameter name is a valid body name in the body group. More... | |
static ER_DllExport void * | inq_body_handle_byidx (void *grp_handle, int body_idx) |
Return body handle by body idx Parameter grp_handle must be valid and not 0Parameter body_idx is in [0..number of bodies[. More... | |
static ER_DllExport int | inq_body_number (void *grp_handle) |
Get number of geometries in the group Parameter grp_handle must be valid and not 0. More... | |
static ER_DllExport int | set_body_handle_current (void *body_handle) |
Set a body as current selected body Parameter body_handle must be valid and not 0. More... | |
static ER_DllExport int | inq_body_cad_type (void *body_handle) |
Return cad_type of a body givin by a handle Parameter body_handle must be valid and not 0The cad_type is one of UNDEF_CAD_TYPE, CUBE_CAD_TYPE, PYRAMID_CAD_TYPE, WEDGE_CAD_TYPE, CYLINDER_CAD_TYPE CONE_CAD_TYPE, SPHERE_CAD_TYPE, VRML_CAD_TYPE , IGP_CAD_TYPE, STL_CAD_TYPE, _3DS_CAD_TYPE. More... | |
static ER_DllExport char * | inq_body_name (void *body_handle) |
Return name of a body givin by a handle Parameter body_handle must be valid and not 0. More... | |
static ER_DllExport frame * | inq_body_ref_pos (void *body_handle) |
Return reference position T_ref of a body givin by a handleParameter body_handle must be valid and not 0Remarks The resulted position of the body w.r.t. it coorsys is T_ref_off = T_ref * T_off See inq_body_ref_pos(), inq_body_off_pos(), inq_body_ref_off_pos(), body_update() More... | |
static ER_DllExport frame * | inq_body_off_pos (void *body_handle) |
Return offset position T_off of a body givin by a handleParameter body_handle must be valid and not 0Remarks The resulted position of the body w.r.t. it coorsys is T_ref_off = T_ref * T_off See inq_body_ref_pos(), inq_body_off_pos(), inq_body_ref_off_pos(), body_update() More... | |
static ER_DllExport frame * | inq_body_ref_off_pos (void *body_handle) |
Return resulted position T_ref_off of a body givin by a handleParameter body_handle must be valid and not 0Remarks The resulted position of the body w.r.t. it coorsys is T_ref_off = T_ref * T_off See inq_body_ref_pos(), inq_body_off_pos(), inq_body_ref_off_pos(), body_update() More... | |
static ER_DllExport void | body_update (void *body_handle) |
Update a body givin by a handle Parameter body_handle must be valid and not 0Remarks This method must be called to calculate resulted position T_ref_off , in case the reference- T_ref and/or offset position T_off was changedThe resulted position of the body w.r.t. it coorsys is T_ref_off = T_ref * T_off See inq_body_ref_pos(), inq_body_off_pos(), inq_body_ref_off_pos(), body_update() More... | |
static ER_DllExport int | body_renewing (void *body_handle, int cad_mem_model, int renew_param) |
Renews a body after modifying its vertices xyz values via API Parameter body_handle must be valid and not 0Param cad_mem_model determine the cad memory model and is one of ER_CAD_MEM_VBO, ER_CAD_MEM_GRAHICS, ER_CAD_MEM_NATIVE_CPUParam renew_param allows to control the renewing procedureIt is a bitwise inclusive OR operator (|) of ER_CAD_RENEW_GEOMETRY, ER_CAD_RENEW_COLLISION, ER_CAD_RENEW_DEL_COLLISION Remarks Setting the body to cad memory model = ER_CAD_MEM_NATIVE_CPU allows to modify its vertices and visualize it immediatly in the 3D Scene. More... | |
static ER_DllExport int | body_save_position (void *body_handle, int grp_type) |
Saves body position as start condition Parameter grp_type is one of ROBOT_GRP, TOOL_GRP or BODY_GRPOnly grp_type equals BODY_GRP is relevant, see inq_body_group_type_current() See body_reset_position(), inq_body_ref_pos(), inq_body_off_pos(), inq_body_ref_off_pos(), body_update() More... | |
static ER_DllExport int | body_reset_position (void *body_handle, int grp_type) |
Resets body position to start condition Parameter grp_type is one of ROBOT_GRP, TOOL_GRP or BODY_GRP Only grp_type equals BODY_GRP is relevant, see inq_body_group_type_current()Remarks The reference- T_ref and the offset position T_off are set to start conditionThe resulted position of the body w.r.t. it coorsys is T_ref_off = T_ref * T_off See body_save_position(), inq_body_ref_pos(), inq_body_off_pos(), inq_body_ref_off_pos(), body_update() More... | |
static ER_DllExport int | body_merge (void *body_handle, char *igp_fln, int merge_attributes) |
merges body and save to ascii or binary igp file Parameter merge_attributes is a bitwise inclusive OR operator (|) ofMERGE_ATTIB_UNDEF - No attributes sets, MERGE_ATTIB_PPO_LIMIT_100 is internally set per default MERGE_ATTIB_CONFIRM_IF_FILE_EXIST - User is prompted to confirm if the igp file name already exist MERGE_ATTIB_SAVE_BINARY_IGP - Save binary igp MERGE_ATTIB_SKIP_LINES - Skip lines for all objects if exist MERGE_ATTIB_NO_PPO_LIMIT - The number of Polygons per object 'PpO' is NOT limited MERGE_ATTIB_PPO_LIMIT_100 - The number of Polygons per object 'PpO' is limited by MERGE_MAX_NUMBER_OF_PPO_100 MERGE_ATTIB_PPO_LIMIT_200 - The number of Polygons per object 'PpO' is limited by MERGE_MAX_NUMBER_OF_PPO_200 MERGE_ATTIB_DEFAULT - equals MERGE_ATTIB_SKIP_LINES | MERGE_ATTIB_PPO_LIMIT_100 Remarks It is only possible to merge igp files See inq_body_cad_type(), inq_body_n_obj(), inq_body_n_poly_total(), inq_body_obj_handle(), inq_body_obj_color_idx() More... | |
static ER_DllExport frame * | inq_body_Tref_pos (void *body_handle, int grp_type, frame *Tref) |
Reference position w.r.t. to inertia coorsys of body givin by a handle The reference position Tref is the position where the body is attached to.Remarks This could be the robot base or an active or passive robot joint in case the grp_type is ROBOT_GRP In case of grp_type equals TOOL_GRP the body is attached to the robots tip In case of grp_type equals BODY_GRP the body is attached to the inertia coorsys or to the robots tip if the body was grabbed Parameter grp_type is one of ROBOT_GRP, TOOL_GRP or BODY_GRPSee inq_body_world_pos() See also inq_body_ref_pos(), inq_body_off_pos(), inq_body_ref_off_pos(), body_update() More... | |
static ER_DllExport frame * | inq_body_world_pos (void *body_handle, int grp_type, frame *Tworld) |
World position w.r.t. to inertia coorsys of body givin by a handle The world position Tworld is the resulted position of the body w.r.t. inertia coorsysRemarks The resulted position of the body w.r.t. it coorsys is T_ref_off = T_ref * T_off Tworld = Tref * T_ref_off To calculate Tref, use inq_body_Tref_pos() See also inq_body_ref_pos(), inq_body_off_pos(), inq_body_ref_off_pos(), body_update() More... | |
static ER_DllExport int | inq_body_idx (void *body_handle) |
Idx of body givin by a handle The returned list idx is zero based [0.. number of bodies-1] see inq_body_number() More... | |
static ER_DllExport int * | inq_body_joint_attach_idx (void *body_handle) |
Robot joint attach idx In case the body belongs to a ROBOT_GRP, the joint attach idx is zero - body attached to robot base [1 to KIN_DOFS] - body attached to an active robot joint [KIN_DOFS+1 to KIN_DOFS+KIN_PASSIV_JNTS] - body attached to an passive robot joint Remarks If the body belongs to the TOOL_GRP or BODY_GRP, the joint attach idx is always 0. More... | |
static ER_DllExport char * | inq_body_file_name (void *body_handle) |
File name of body givin by a handle. More... | |
static ER_DllExport int | inq_body_n_obj (void *body_handle) |
Number of object within body givin by a handle A body contains a number of objects Each object consists of: one object color, number of points, polygon indices and lines indices In case the number of polygons and lines are zero, the object represents a point cloud. More... | |
static ER_DllExport int | inq_body_n_point_total (void *body_handle) |
Number of total points/vertices within body givin by a handle A body contains a number of objects. Each object consists of a number of points. More... | |
static ER_DllExport int | inq_body_n_line_total (void *body_handle) |
Number of total lines within body givin by a handle A body contains a number of objects. Each object consists of a number of lines. More... | |
static ER_DllExport int | inq_body_n_poly_total (void *body_handle) |
Number of total polygons within body givin by a handle A body contains a number of objects. Each object consists of a number of polygons. More... | |
static ER_DllExport int | inq_body_n_coorsys_total (void *body_handle) |
Number of coorsys within body givin by a handle. More... | |
static ER_DllExport float * | inq_body_scale (void *body_handle) |
XYZ scaling vector of body givin by a handle The scaling vector has positive values >0 and scales the original geometry point data in yxz direction see inq_body_size() More... | |
static ER_DllExport float * | inq_body_size (void *body_handle) |
XYZ size vector of body givin by a handle The size vector values are a result of the original geometry point data scaled by the scaling vector in yxz direction see inq_body_scale() More... | |
static ER_DllExport int * | inq_body_color_idx (void *body_handle) |
Color idx of body givin by a handle The color idx is a positive value see set_body_rgba_color() More... | |
static ER_DllExport int * | inq_body_color_sub_idx (void *body_handle) |
Color sub idx of body givin by a handle The color sub idx is a positive value see inq_body_color_idx() Remarks This method has currently no effect! More... | |
static ER_DllExport int | set_body_rgba_color (void *body_handle, float *rgba_color, int color_use=COLOR_USE_USER, int color_idx2change=0) |
Set the RGB color of body givin by a handle Furthermore the object color can be exchanged Parameter color_use is one of COLOR_USE_USER - USER color are saved with .cel, .rob or .ras file COLOR_USE_FIX - Note: FIX color are only temporarly COLOR_USE_FIX_IDX - Changes all objects with FIX color and with 'color_idx2change' to rgba_color Parameter color_idx2change allows to exchange a specific color for all objects with exactly this color idx color_idx2change , if set >0.see inq_body_color_idx() More... | |
static ER_DllExport int | convert_color_idx_to_rgba (int idx, float *rgba) |
Convert a color idx to RGB color . More... | |
static ER_DllExport int | convert_color_rgb_to_idx (float *rgb, int *idx) |
Convert a RGB color to color idx . More... | |
static ER_DllExport int * | inq_body_render (void *body_handle) |
Get the render type of body givin by a handle The render type and is one of FLAT=6, WIRE=1, BBFLAT=2, BBWIRE=3, INVISIBLE=4, POINT_RENDER=5, SMOOTH_RENDER=0. More... | |
static ER_DllExport int | inq_body_cad_mem_model (void *body_handle) |
Get the cad memory model of body givin by a handle The cad memory model and is one of ER_CAD_MEM_VBO, ER_CAD_MEM_GRAHICS, ER_CAD_MEM_NATIVE_CPU Remarks Call body_renewing() to change and renew the cad memory model. More... | |
static ER_DllExport int | inq_body_n_obj_vbo (void *body_handle) |
Get the number of objects loaded into the grafics board Remarks Each body consists of several objects. More... | |
static ER_DllExport float * | inq_body_transparency (void *body_handle) |
Transparency (alfa) value of body givin by a handle The transparency value is between 0 and 1. 1 means fully opaque , 0 means fully transparent see inq_body_show_transparent() More... | |
static ER_DllExport float * | inq_body_collision_tolerance (void *body_handle) |
Collision tolerance value of body givin by a handle The collision tolerance in [mm] defines a 'skin' of thickness around the body. More... | |
static ER_DllExport int * | inq_body_poly_invert (void *body_handle) |
Polygon invert flag of body givin by a handle If the polygon invert flag is set, all polygons of body are inverted for visualization. More... | |
static ER_DllExport int * | inq_body_collision (void *body_handle) |
Collision flag of body givin by a handle The collision flag is one of 0-Off, 1-Concave, 2-Convex, 3-Bbox, 4-Disabled If the collision flag is marked as. More... | |
static ER_DllExport char * | inq_body_coll_exl_list (void *body_handle) |
Collision exclude list of same group used for robot itself collision The string contains indices of bodies excluded from collision 'same group' the bodies belong either to ROBOT_GRP or TOOL_GRP Example coll_exl_list = "1 3 9" -> Bodies with these indices are excluded from itself collision see inq_body_coll_exl_list_mix(), inq_body_idx() More... | |
static ER_DllExport char * | inq_body_coll_exl_list_mix (void *body_handle) |
Collision exclude list of mixed group used for robot itself collision The string contains indices of bodies excluded from collision 'mixed group' the bodies belong to ROBOT_GRP vs. TOOL_GRP Example coll_exl_list_mix = "1 3 9" -> If this list belongs to ROBOT_GRP, all bodies from TOOL_GRP with these indices are excluded from itself collision see inq_body_coll_exl_list(), inq_body_idx() More... | |
static ER_DllExport ER_UID * | inq_body_grab (void *body_handle) |
Grab status of body givin by a handle Obsolete: Only if the body belongs to BODY_GRP, it could be grabbed by the robot. More... | |
static ER_DllExport int * | inq_body_show_name (void *body_handle) |
Show the name of body givin by a handle Allows to dis- or enable visualizazion of body name. More... | |
static ER_DllExport int * | inq_body_bface_culling (void *body_handle) |
Enable/disable backface culling of body givin by a handle. More... | |
static ER_DllExport int * | inq_body_show_normals (void *body_handle) |
Show normals of body givin by a handle Allows to dis- or enable visualizazion of body normals. More... | |
static ER_DllExport int * | inq_body_show_edges (void *body_handle) |
Show body edges Allows to dis- or enable visualizazion of body edges. More... | |
static ER_DllExport int * | inq_body_show_mesh (void *body_handle) |
Show body meshes Allows to dis- or enable visualizazion of body meshes. More... | |
static ER_DllExport int * | inq_body_is_pickable (void *body_handle) |
Enable/disable pickability of body givin by a handle. More... | |
static ER_DllExport int * | inq_body_mark_selected (void *body_handle) |
Enable/disable mark a body givin by a handle. More... | |
static ER_DllExport int * | inq_body_mark_selected_color_idx (void *body_handle) |
Inquire the color_idx to mark a body givin by a handle. More... | |
static ER_DllExport int * | inq_body_show_transparent (void *body_handle) |
Show body transparency Allows to dis- or enable body transparency see inq_body_transparency() More... | |
static ER_DllExport void * | inq_body_obj_handle (void *body_handle, int i_obj) |
Handle to object within a body Use inq_body_n_obj() to retreive the number of objects within a body. More... | |
static ER_DllExport void * | inq_body_obj_attributes_handle (void *body_handle, int i_obj) |
Handle to object attributes within a body Use inq_body_n_obj() to retreive the number of objects belonging to a body. More... | |
static ER_DllExport int * | inq_body_obj_n_point (void *obj_handle) |
Number of points within an object. More... | |
static ER_DllExport int * | inq_body_obj_n_line (void *obj_handle) |
Number of lines within an object. More... | |
static ER_DllExport int * | inq_body_obj_n_poly (void *obj_handle) |
Number of polygons within an object. More... | |
static ER_DllExport int * | inq_body_obj_n_coorsys (void *obj_handle) |
Number of coorsys within an object. More... | |
static ER_DllExport int * | inq_body_obj_is_collided (void *obj_handle_attributes) |
Collision flag of an object see inq_body_obj_attributes_handle() to retrieve the object attribute handle. More... | |
static ER_DllExport int * | inq_body_obj_max_point_in_poly (void *obj_handle) |
Maximum number of points in a polygon within an object. More... | |
static ER_DllExport float * | inq_body_obj_color_rgba (void *obj_handle_attributes) |
RGBA Color of an object. More... | |
static ER_DllExport int * | inq_body_obj_color_idx (void *obj_handle) |
Color idx for an object. More... | |
static ER_DllExport int * | inq_body_obj_color_den_idx (void *obj_handle) |
Den_Color Idx an object. More... | |
static ER_DllExport int * | inq_body_obj_ptrcolor (void *obj_handle_attributes) |
Color pointer Idx of an object see inq_body_obj_attributes_handle() to retrieve the object attribute handle. More... | |
static ER_DllExport float * | inq_body_obj_points (void *obj_handle, int idx) |
XYZ Vertex of an object Use er_cad_io.inq_body_obj_n_point() to get the number of point of an object. More... | |
static ER_DllExport int * | inq_body_obj_lines (void *obj_handle, int idx) |
Line segment indexes of an object Use er_cad_io.inq_body_obj_n_line() to get the number of lines of an object. More... | |
static ER_DllExport int * | inq_body_obj_polys (void *obj_handle, int idx) |
Polygon indexes of an object Use er_cad_io.inq_body_obj_n_poly() to get the number of polygons of an object. More... | |
static ER_DllExport float * | inq_body_obj_normals (void *obj_handle, int idx) |
Normal vector of polygon of an object Use er_cad_io.inq_body_obj_n_poly() to get the number of polygons of an object. More... | |
static ER_DllExport frame * | inq_body_obj_coorsys (void *obj_handle, int idx) |
Coorsys of an object Use er_cad_io.inq_body_obj_n_coorsys() to get the number of coorsys of an object. More... | |
static ER_DllExport int | get_body_para (void *body_handle, float *para, int *num_para) |
Body parameter The content of the parameter vector para depends of the "cad_type", see inq_body_cad_type()which is one of: More... | |
static ER_DllExport int | set_body_para (void *body_handle, float *para) |
Set or modify body parameter The content of the parameter vector para depends of the "cad_type"see inq_body_cad_type(), get_body_para() More... | |
static ER_DllExport int | body_update_cad_file (void *body_handle=0, int use_vbo=0) |
Updates a body Unloads and reloads a body from file Parameter /p use_vbo determines if VBO (vertex buffer object - loading the geometry into the grafics board) is used. More... | |
static ER_DllExport int | body_clear (void *grp_handle, void *body_handle) |
Unload a body. More... | |
Static Public Member Functions inherited from ER_CAPI_CAD | |
static ER_DllExport int | Unload_cCAD (int confirm=1) |
Unload current selected CAD geometry. More... | |
static ER_DllExport int | Unload_allCAD (int confirm=1) |
Unload all CAD Geometries in current selected grp. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from ER_CAPI_CAD | |
static ER_CAPI_CAD_IO | er_capi_cad_io |
Method class for access to geometry parameter: Location, polygons, vertices, attributes, etc. More... | |
static ER_CAPI_CAD_CREATE | er_capi_cad_create |
Method class for creating primitive geometries such as cubes, cylinder, spheres, etc. More... | |
static ER_CAPI_CAD_IMPORT | er_capi_cad_import |
Method class for importing existing 3D geometries (IGP, STL, 3DS) More... | |
static ER_CAPI_CAD_CONVERT | er_capi_cad_convert |
Method class for converting external neutral and native CAD formats (STEP, IGES, JT-Open, CATIA, Pro/E, and so on) into the internal IGP Part File Format. More... | |
Static Public Attributes inherited from ER_CAPI | |
static ER_CAPI_USER_IO | er_capi_user_io |
Method class for interaction with EASY-ROB. More... | |
static ER_CAPI_DEVICES | er_capi_devices |
Method class to create, attach, update devices, for kinematics calculations and for trajectory planning and -execution. More... | |
static ER_CAPI_SIM | er_capi_sim |
Method class for simulation settings. More... | |
static ER_CAPI_TARGETS | er_capi_targets |
Method class for paths and tags. More... | |
static ER_CAPI_CAD | er_capi_cad |
Method class for for 3D CAD Data import and -export, changing attributes and positions. More... | |
static ER_CAPI_SYS | er_capi_sys |
Method class for mathematical calculations, simulation status, units. More... | |
Method class for access to geometry parameter: Location, polygons, vertices, attributes, etc.
|
static |
Unload a body.
[in] | grp_handle | - handle to gruop |
[in] | body_handle | - handle to body |
0 | - OK |
1 | - Error |
|
static |
merges body and save to ascii or binary igp file
Parameter merge_attributes
is a bitwise inclusive OR operator (|) of
MERGE_ATTIB_UNDEF - No attributes sets, MERGE_ATTIB_PPO_LIMIT_100 is internally set per default
MERGE_ATTIB_CONFIRM_IF_FILE_EXIST - User is prompted to confirm if the igp file name already exist
MERGE_ATTIB_SAVE_BINARY_IGP - Save binary igp
MERGE_ATTIB_SKIP_LINES - Skip lines for all objects if exist
MERGE_ATTIB_NO_PPO_LIMIT - The number of Polygons per object 'PpO' is NOT limited
MERGE_ATTIB_PPO_LIMIT_100 - The number of Polygons per object 'PpO' is limited by MERGE_MAX_NUMBER_OF_PPO_100
MERGE_ATTIB_PPO_LIMIT_200 - The number of Polygons per object 'PpO' is limited by MERGE_MAX_NUMBER_OF_PPO_200
MERGE_ATTIB_DEFAULT - equals MERGE_ATTIB_SKIP_LINES | MERGE_ATTIB_PPO_LIMIT_100
Remarks
It is only possible to merge igp files
See inq_body_cad_type(), inq_body_n_obj(), inq_body_n_poly_total(), inq_body_obj_handle(), inq_body_obj_color_idx()
[in] | body_handle | - handle to body |
[in] | igp_fln | - name of created igp file |
[in] | merge_attributes | - merge attributes |
0 | - Ok |
1 | - Error |
|
static |
Renews a body after modifying its vertices xyz values via API
Parameter body_handle
must be valid and not 0
Param cad_mem_model
determine the cad memory model and is one of ER_CAD_MEM_VBO, ER_CAD_MEM_GRAHICS, ER_CAD_MEM_NATIVE_CPU
Param renew_param
allows to control the renewing procedure
It is a bitwise inclusive OR operator (|) of ER_CAD_RENEW_GEOMETRY, ER_CAD_RENEW_COLLISION, ER_CAD_RENEW_DEL_COLLISION
Remarks
Setting the body to cad memory model = ER_CAD_MEM_NATIVE_CPU allows to modify its vertices and visualize it immediatly in the 3D Scene.
[in] | body_handle | - handle to body |
[in] | cad_mem_model | - bodies memory model |
[in] | renew_param | - parameter to control renewing procedure |
0 | - Ok |
1 | - Error, renewing failed |
|
static |
Resets body position to start condition
Parameter grp_type
is one of ROBOT_GRP, TOOL_GRP or BODY_GRP Only grp_type equals BODY_GRP is relevant, see inq_body_group_type_current()
Remarks
The reference- T_ref
and the offset position T_off
are set to start condition
The resulted position of the body w.r.t. it coorsys is
T_ref_off = T_ref * T_off
See body_save_position(), inq_body_ref_pos(), inq_body_off_pos(), inq_body_ref_off_pos(), body_update()
[in] | body_handle | - handle to body |
[in] | grp_type | - group type |
0 | - Ok |
1 | - Error |
|
static |
Saves body position as start condition
Parameter grp_type
is one of ROBOT_GRP, TOOL_GRP or BODY_GRP
Only grp_type equals BODY_GRP is relevant, see inq_body_group_type_current()
See body_reset_position(), inq_body_ref_pos(), inq_body_off_pos(), inq_body_ref_off_pos(), body_update()
[in] | body_handle | - handle to body |
[in] | grp_type | - group type |
0 | - Ok |
1 | - Error |
|
static |
Update a body givin by a handle
Parameter body_handle
must be valid and not 0
Remarks
This method must be called to calculate resulted position T_ref_off
, in case the reference- T_ref
and/or offset position T_off
was changed
The resulted position of the body w.r.t. it coorsys is
T_ref_off = T_ref * T_off
See inq_body_ref_pos(), inq_body_off_pos(), inq_body_ref_off_pos(), body_update()
[in] | body_handle | - handle to body |
|
static |
Updates a body
Unloads and reloads a body from file
Parameter /p use_vbo determines if VBO (vertex buffer object - loading the geometry into the grafics board) is used.
[in] | body_handle | - handle to body |
[in] | use_vbo | - 1 use VBO, 0 do not use VBO |
0 | - OK |
1 | - Error, maybe Thread running |
|
static |
Convert a color idx to RGB color
.
[in] | idx | - color idx |
[out] | rgba | - RGB color with Alfa value for transparency, size ::4 |
0 | - OK |
1 | - Error |
|
static |
Convert a RGB color to color idx
.
[in] | rgb | - RGB color |
[out] | idx | - color idx |
0 | - OK |
1 | - Error |
|
static |
Body parameter
The content of the parameter vector para
depends of the "cad_type", see inq_body_cad_type()
which is one of:
see set_body_para() to modify body parameter
Remarks
In case of cad type is equals to VRML_CAD_TYPE, IGP_CAD_TYPE, STL_CAD_TYPE or _3DS_CAD_TYPE
para
points to the scaling vector, see inq_body_scale()
[in] | body_handle | - handle to body |
[in] | para | - vector containing the parameter of body |
[out] | num_para | - length of para vector |
0 | - OK |
1 | - Error |
|
static |
Enable/disable backface culling of body givin by a handle.
[in] | body_handle | - handle to body |
pointer | to backface culling flag |
|
static |
Get the cad memory model of body givin by a handle
The cad memory model and is one of ER_CAD_MEM_VBO, ER_CAD_MEM_GRAHICS, ER_CAD_MEM_NATIVE_CPU
Remarks
Call body_renewing() to change and renew the cad memory model.
[in] | body_handle | - handle to body |
current | cad memory model |
|
static |
Return cad_type of a body givin by a handle
Parameter body_handle
must be valid and not 0
The cad_type is one of UNDEF_CAD_TYPE, CUBE_CAD_TYPE, PYRAMID_CAD_TYPE, WEDGE_CAD_TYPE, CYLINDER_CAD_TYPE
CONE_CAD_TYPE, SPHERE_CAD_TYPE, VRML_CAD_TYPE , IGP_CAD_TYPE, STL_CAD_TYPE, _3DS_CAD_TYPE.
[in] | body_handle | - handle to body |
0 | - Ok |
1 | - Error |
|
static |
Collision exclude list of same group used for robot itself collision
The string contains indices of bodies excluded from collision
'same group' the bodies belong either to ROBOT_GRP or TOOL_GRP
Example
coll_exl_list = "1 3 9" -> Bodies with these indices are excluded from itself collision
see inq_body_coll_exl_list_mix(), inq_body_idx()
[in] | body_handle | - handle to body |
pointer | to collision exclude list of same group |
|
static |
Collision exclude list of mixed group used for robot itself collision
The string contains indices of bodies excluded from collision
'mixed group' the bodies belong to ROBOT_GRP vs. TOOL_GRP
Example
coll_exl_list_mix = "1 3 9" -> If this list belongs to ROBOT_GRP, all bodies from TOOL_GRP with these indices are excluded from itself collision
see inq_body_coll_exl_list(), inq_body_idx()
[in] | body_handle | - handle to body |
pointer | to collision exclude list of mixed group |
|
static |
Collision flag of body givin by a handle
The collision flag is one of 0-Off, 1-Concave, 2-Convex, 3-Bbox, 4-Disabled
If the collision flag is marked as.
see inq_body_collision_tolerance()
[in] | body_handle | - handle to body |
pointer | collision flag |
|
static |
Collision tolerance value of body givin by a handle
The collision tolerance in [mm] defines a 'skin' of thickness around the body.
[in] | body_handle | - handle to body |
pointer | collision tolerance |
|
static |
Color idx of body givin by a handle
The color idx is a positive value
see set_body_rgba_color()
[in] | body_handle | - handle to body |
color | idx |
|
static |
Color sub idx of body givin by a handle
The color sub idx is a positive value
see inq_body_color_idx()
Remarks
This method has currently no effect!
[in] | body_handle | - handle to body |
color | sub idx |
|
static |
File name of body givin by a handle.
[in] | body_handle | - handle to body |
file_name |
|
static |
Grab status of body givin by a handle
Obsolete: Only if the body belongs to BODY_GRP, it could be grabbed by the robot.
[in] | body_handle | - handle to body |
pointer | to grab status |
|
static |
|
static |
Get current group handle
Depending on cDevice and the current selected geometry.
handle | of current group, NULL if not valid |
|
static |
|
static |
Return body handle by body idx
Parameter grp_handle
must be valid and not 0
Parameter body_idx
is in [0..number of bodies[.
[in] | grp_handle | - group handle |
[in] | body_idx | idx of body [0... |
handle | of body, NULL if not valid |
|
static |
Return body handle by body name
Parameter grp_handle
must be valid and not 0
Parameter name
is a valid body name in the body group.
[in] | grp_handle | - group handle |
[in] | name | of body |
handle | of body, NULL if not valid |
|
static |
Return body handle
If parameter grp_handle
is 0, the body handle of the current group is returned.
[in] | grp_handle | group handle |
handle | of body, NULL if not valid |
|
static |
Idx of body givin by a handle
The returned list idx is zero based [0.. number of bodies-1]
see inq_body_number()
[in] | body_handle | - handle to body |
Idx | - zero based index |
|
static |
Enable/disable pickability of body givin by a handle.
[in] | body_handle | - handle to body |
pointer | to is_pickable flag |
|
static |
Robot joint attach idx
In case the body belongs to a ROBOT_GRP, the joint attach idx is
zero - body attached to robot base
[1 to KIN_DOFS] - body attached to an active robot joint
[KIN_DOFS+1 to KIN_DOFS+KIN_PASSIV_JNTS] - body attached to an passive robot joint
Remarks
If the body belongs to the TOOL_GRP or BODY_GRP, the joint attach idx is always 0.
[in] | body_handle | - handle to body |
joint | attach idx |
|
static |
Enable/disable mark a body givin by a handle.
[in] | body_handle | - handle to body |
pointer | to mark_selected flag |
|
static |
Inquire the color_idx to mark a body givin by a handle.
[in] | body_handle | - handle to body |
pointer | to mark_selected_color_idx |
|
static |
Number of coorsys within body givin by a handle.
[in] | body_handle | - handle to body |
Number | of coorsys |
|
static |
Number of total lines within body givin by a handle
A body contains a number of objects. Each object consists of a number of lines.
[in] | body_handle | - handle to body |
Number | of total lines |
|
static |
Number of object within body givin by a handle
A body contains a number of objects
Each object consists of: one object color, number of points, polygon indices and lines indices
In case the number of polygons and lines are zero, the object represents a point cloud.
[in] | body_handle | - handle to body |
number | of objects |
|
static |
Get the number of objects loaded into the grafics board
Remarks
Each body consists of several objects.
[in] | body_handle | - handle to body |
number | of objects loaded into the grafics board |
|
static |
Number of total points/vertices within body givin by a handle
A body contains a number of objects. Each object consists of a number of points.
[in] | body_handle | - handle to body |
Number | of total points/vertices |
|
static |
Number of total polygons within body givin by a handle
A body contains a number of objects. Each object consists of a number of polygons.
[in] | body_handle | - handle to body |
Number | of total polygons |
|
static |
Return name of a body givin by a handle
Parameter body_handle
must be valid and not 0
.
[in] | body_handle | - handle to body |
pointer | to char - name of body |
NULL | - Error |
|
static |
Get number of geometries in the group
Parameter grp_handle
must be valid and not 0.
[in] | grp_handle | - group handle |
Number | of geometries |
|
static |
Handle to object attributes within a body
Use inq_body_n_obj() to retreive the number of objects belonging to a body.
[in] | body_handle | - handle to body |
[in] | i_obj | - idx of object within a body [0..n_obj-1] |
obj_handle_attributes | - handle to object attibutes, NULL if not valid |
|
static |
Den_Color Idx an object.
[in] | obj_handle | - handle to object |
pointer | to den_color idx |
|
static |
Color idx for an object.
[in] | obj_handle | - handle to object |
pointer | to color idx |
|
static |
RGBA Color of an object.
[in] | obj_handle_attributes | - handle to object attibutes |
pointer | to rgba color |
|
static |
Coorsys of an object
Use er_cad_io.inq_body_obj_n_coorsys() to get the number of coorsys of an object.
[in] | obj_handle | - handle to object |
[in] | idx | - coorsys index [0.. number of coorsys-1] |
frame | pointer to coorsys frame with idx |
|
static |
Handle to object within a body
Use inq_body_n_obj() to retreive the number of objects within a body.
[in] | body_handle | - handle to body |
[in] | i_obj | - idx of object within a body [0..n_obj-1] |
obj_handle | - handle to object, NULL if not valid |
|
static |
Collision flag of an object
see inq_body_obj_attributes_handle() to retrieve the object attribute handle.
[in] | obj_handle_attributes | - handle to object attibutes |
object | collision flag |
|
static |
Line segment indexes of an object
Use er_cad_io.inq_body_obj_n_line() to get the number of lines of an object.
[in] | obj_handle | - handle to object |
[in] | idx | - line index [0.. number of lines-1] |
pointer | to line segment idx |
|
static |
Maximum number of points in a polygon within an object.
[in] | obj_handle | - handle to object |
maximum | number of points in a polygon |
|
static |
Number of coorsys within an object.
[in] | obj_handle | - handle to object |
number | of coorsys |
|
static |
Number of lines within an object.
[in] | obj_handle | - handle to object |
number | of lines |
|
static |
Number of points within an object.
[in] | obj_handle | - handle to object |
number | of points |
|
static |
Number of polygons within an object.
[in] | obj_handle | - handle to object |
number | of polygons |
|
static |
Normal vector of polygon of an object
Use er_cad_io.inq_body_obj_n_poly() to get the number of polygons of an object.
[in] | obj_handle | - handle to object |
[in] | idx | - polygon index [0.. number of polygons-1] |
pointer | to normal vector |
|
static |
XYZ Vertex of an object
Use er_cad_io.inq_body_obj_n_point() to get the number of point of an object.
[in] | obj_handle | - handle to object |
[in] | idx | - point index [0.. number of points-1] |
pointer | to xyz vertex |
|
static |
Polygon indexes of an object
Use er_cad_io.inq_body_obj_n_poly() to get the number of polygons of an object.
[in] | obj_handle | - handle to object |
[in] | idx | - polygon index [0.. number of polygons-1] |
pointer | to polygons idx |
|
static |
Color pointer Idx of an object
see inq_body_obj_attributes_handle() to retrieve the object attribute handle.
[in] | obj_handle_attributes | - handle to object attibutes |
color | pointer |
|
static |
Return offset position T_off
of a body givin by a handle
Parameter body_handle
must be valid and not 0
Remarks
The resulted position of the body w.r.t. it coorsys is
T_ref_off = T_ref * T_off
See inq_body_ref_pos(), inq_body_off_pos(), inq_body_ref_off_pos(), body_update()
[in] | body_handle | - handle to body |
pointer | to frame |
NULL | - Error |
|
static |
Polygon invert flag of body givin by a handle
If the polygon invert flag is set, all polygons of body are inverted for visualization.
[in] | body_handle | - handle to body |
pointer | invert flag |
|
static |
Return resulted position T_ref_off
of a body givin by a handle
Parameter body_handle
must be valid and not 0
Remarks
The resulted position of the body w.r.t. it coorsys is
T_ref_off = T_ref * T_off
See inq_body_ref_pos(), inq_body_off_pos(), inq_body_ref_off_pos(), body_update()
[in] | body_handle | - handle to body |
pointer | to frame |
NULL | - Error |
|
static |
Return reference position T_ref
of a body givin by a handle
Parameter body_handle
must be valid and not 0
Remarks
The resulted position of the body w.r.t. it coorsys is
T_ref_off = T_ref * T_off
See inq_body_ref_pos(), inq_body_off_pos(), inq_body_ref_off_pos(), body_update()
[in] | body_handle | - handle to body |
pointer | to frame |
NULL | - Error |
|
static |
Get the render type of body givin by a handle
The render type and is one of
FLAT=6, WIRE=1, BBFLAT=2, BBWIRE=3, INVISIBLE=4, POINT_RENDER=5, SMOOTH_RENDER=0.
[in] | body_handle | - handle to body |
Pointer | to render type |
|
static |
XYZ scaling vector of body givin by a handle
The scaling vector has positive values >0 and scales the original geometry point data in yxz direction
see inq_body_size()
[in] | body_handle | - handle to body |
scaling | vector, size DIM |
|
static |
Show body edges
Allows to dis- or enable visualizazion of body edges.
[in] | body_handle | - handle to body |
pointer | to show_edges flag |
|
static |
Show body meshes
Allows to dis- or enable visualizazion of body meshes.
[in] | body_handle | - handle to body |
pointer | to show_mesh flag |
|
static |
Show the name of body givin by a handle
Allows to dis- or enable visualizazion of body name.
[in] | body_handle | - handle to body |
pointer | to show_name flag |
|
static |
Show normals of body givin by a handle
Allows to dis- or enable visualizazion of body normals.
[in] | body_handle | - handle to body |
pointer | to show_normals flag |
|
static |
Show body transparency
Allows to dis- or enable body transparency
see inq_body_transparency()
[in] | body_handle | - handle to body |
pointer | to show_transparent flag |
|
static |
XYZ size vector of body givin by a handle
The size vector values are a result of the original geometry point data scaled by the scaling vector in yxz direction
see inq_body_scale()
[in] | body_handle | - handle to body |
size | vector, size of vector DIM |
|
static |
Transparency (alfa) value of body givin by a handle
The transparency value is between 0 and 1. 1 means fully opaque , 0 means fully transparent
see inq_body_show_transparent()
[in] | body_handle | - handle to body |
pointer | transparency value |
|
static |
Reference position w.r.t. to inertia coorsys of body givin by a handle
The reference position Tref
is the position where the body is attached to.
Remarks
This could be the robot base or an active or passive robot joint in case the grp_type is ROBOT_GRP
In case of grp_type equals TOOL_GRP the body is attached to the robots tip
In case of grp_type equals BODY_GRP the body is attached to the inertia coorsys or to the robots tip if the body was grabbed
Parameter grp_type
is one of ROBOT_GRP, TOOL_GRP or BODY_GRP
See inq_body_world_pos()
See also inq_body_ref_pos(), inq_body_off_pos(), inq_body_ref_off_pos(), body_update()
[in] | body_handle | - handle to body |
[in] | grp_type | - group type |
[in] | Tref | - reference position w.r.t. inertia coorsys |
Pointer | to frame of Tref |
|
static |
World position w.r.t. to inertia coorsys of body givin by a handle
The world position Tworld
is the resulted position of the body w.r.t. inertia coorsys
Remarks
The resulted position of the body w.r.t. it coorsys is T_ref_off = T_ref * T_off
Tworld = Tref * T_ref_off
To calculate Tref, use inq_body_Tref_pos()
See also inq_body_ref_pos(), inq_body_off_pos(), inq_body_ref_off_pos(), body_update()
[in] | body_handle | - handle to body |
[in] | grp_type | - group type |
[in] | Tworld | - reference position w.r.t. inertia coorsys |
Pointer | frame of Tworld |
|
static |
|
static |
Set a body as current selected body
Parameter body_handle
must be valid and not 0.
[in] | body_handle | - handle to body |
0 | - Ok |
1 | - Error |
|
static |
Set or modify body parameter The content of the parameter vector para
depends of the "cad_type"
see inq_body_cad_type(), get_body_para()
[in] | body_handle | - handle to body |
[in] | para | - vector containing the parameter of body |
0 | - OK |
1 | - Error |
|
static |
Set the RGB color of body givin by a handle
Furthermore the object color can be exchanged
Parameter color_use
is one of
COLOR_USE_USER - USER color are saved with .cel, .rob or .ras file
COLOR_USE_FIX - Note: FIX color are only temporarly
COLOR_USE_FIX_IDX - Changes all objects with FIX color and with 'color_idx2change' to rgba_color
Parameter color_idx2change
allows to exchange a specific color for all objects with exactly this color idx color_idx2change
, if set >0.
see inq_body_color_idx()
[in] | body_handle | - handle to body |
[in] | rgba_color | - RGB color with Alfa value for transparency |
[in] | color_use | |
[in] | color_idx2change |
0 | - OK |
1 | - Error |