16 int main(
int argc,
char **argv)
23 for (
int i = 0; i < 6; i++)
44 joint_state[0].
pos = 0.0;
45 joint_state[1].
pos = 0.1;
46 joint_state[2].
pos = 0.2;
47 joint_state[3].
pos = 0.3;
48 joint_state[4].
pos = 0.4;
49 joint_state[5].
pos = 0.5;
56 double move_joint_pos1[6];
57 for(
size_t i = 0; i < 6; ++i) {
58 move_joint_pos1[i] = 0.8;
61 move_joint_param.
v = 1.0;
62 move_joint_param.
acc = 1.0;
66 move_joint_param.
time = 0.0;
Limitation data structure for trajectory generator.
Trjecotry generator update ret value.
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.
double jnt_max_acc[LMC_MAX_JOINT_NUM]
double cartesian_max_rot_acc
void lmc_rm_delete(lmc_robot_model_t **robot_model_addr)
Delete a robot model instance.
Trjecotry generator runtime data.
unsigned int interruptable
unsigned int jnt_acc_time_constant
int lmc_tg_set_limit(lmc_tg_t *const tg, lmc_tg_limit_t const *const limit)
Set trajectory generator limit parameters.
Trajectory generator related data structures and functions.
double jnt_pos_positive_limit[LMC_MAX_JOINT_NUM]
Trajectory generator configuration data structure.
Configuration data structure for trajectory generator.
unsigned int smooth_move_to_next
lmc_tg_buffer_ret_t lmc_tg_buffer_move_joint(lmc_tg_t *const tg, int id, double const *const target, lmc_tg_move_param_t const *const param)
Try to add a move joint trajectory to buffer.
lmc_robot_model_t * lmc_rm_new()
Create a robot model instance.
int lmc_tg_get_updated_date(lmc_tg_t const *const tg, lmc_joint_cmd_t *const joint_cmd, lmc_tg_runtime_data_t *const tg_runtime_data)
Get usefull trajectory generator update data.
double cartesian_max_rot_v
struct lmc_robot_model lmc_robot_model_t
Robot model data structure.
lmc_tg_update_state_t state
void lmc_tg_set_joint_pos(lmc_tg_t *const tg, lmc_joint_state_t const *const joint_state)
This function set current joint anchor point of trajectory generator caculation. It must be called wh...
double jnt_pos_negative_limit[LMC_MAX_JOINT_NUM]
lmc_tg_update_ret_t lmc_tg_update(lmc_tg_t *const tg)
Core calculation function of trajectory generator, always call it in realtime loop,.
void lmc_tg_delete(lmc_tg_t **tg_addr)
Delete a trajectory generator instance.
struct lmc_tg lmc_tg_t
Trajectory generator data structure.
int main(int argc, char **argv)
Example of tg usage.
Trjecotry generator move parameter.
lmc_tg_t * lmc_tg_new()
Create a trajectory generator instance.
create robot model function.
int lmc_tg_init(lmc_tg_t *const tg, lmc_robot_model_t const *const robot_model, lmc_tg_config_t const *const config)
Init a trajectory generator.
lmc_robot_model_config_t createLM3Config()
Create a robot model config instance.
double jnt_max_v[LMC_MAX_JOINT_NUM]