amino
Lightweight Robot Utility Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
traj.h File Reference

Go to the source code of this file.

Classes

struct  aa_ct_pt
 Waypoint. More...
 

Functions

struct aa_ct_pt_list * aa_ct_pt_list_create (struct aa_mem_region *reg)
 Initialize and construct a point list from a memory region. More...
 
void aa_ct_pt_list_add (struct aa_ct_pt_list *list, struct aa_ct_state *state)
 Add a reference to a waypoint to a point list. More...
 
void aa_ct_pt_list_destroy (struct aa_ct_pt_list *list)
 Destroys an allocated point list. More...
 
void aa_ct_pt_list_dump (FILE *stream, struct aa_ct_pt_list *list)
 Print out a list of points to a file. More...
 
int aa_ct_seg_list_eval (struct aa_ct_seg_list *list, struct aa_ct_state *state, double t)
 Evaluates a segment list at a given time. More...
 
void aa_ct_seg_list_plot (struct aa_ct_seg_list *list, size_t n_q, double dt)
 Plots a segment list with a given resolution. More...
 
void aa_ct_seg_list_destroy (struct aa_ct_seg_list *list)
 Destroys an allocated segment list. More...
 
struct aa_ct_seg_list * aa_ct_tjq_pb_generate (struct aa_mem_region *reg, struct aa_ct_pt_list *list, struct aa_ct_state *limits)
 Generate a parabolic blend trajectory from a point list. More...
 
struct aa_ct_seg_list * aa_ct_tjX_pb_generate (struct aa_mem_region *reg, struct aa_ct_pt_list *list, struct aa_ct_state *limits)
 Generate a parabolic blend trajectory from a point list. More...
 

Function Documentation

void aa_ct_pt_list_add ( struct aa_ct_pt_list *  list,
struct aa_ct_state state 
)

Add a reference to a waypoint to a point list.

The reference will be kept in the list.

Parameters
listList to add point to
stateState to add to list
struct aa_ct_pt_list* aa_ct_pt_list_create ( struct aa_mem_region reg)

Initialize and construct a point list from a memory region.

Parameters
regMemory region to allocate from
Returns
A freshly allocated struct aa_ct_pt_list.
void aa_ct_pt_list_destroy ( struct aa_ct_pt_list *  list)

Destroys an allocated point list.

Parameters
listList to destroy
void aa_ct_pt_list_dump ( FILE *  stream,
struct aa_ct_pt_list *  list 
)

Print out a list of points to a file.

Parameters
streamFile to print to
listPoint list to print
void aa_ct_seg_list_destroy ( struct aa_ct_seg_list *  list)

Destroys an allocated segment list.

Parameters
listList to destroy
int aa_ct_seg_list_eval ( struct aa_ct_seg_list *  list,
struct aa_ct_state state,
double  t 
)

Evaluates a segment list at a given time.

Fills in the provided state struct With the reference state at that time.

Parameters
listSegment list to evaluate
stateState structure to fill in
tTime to evaluate segment list at
Returns
1 if time is within segment list, 0 if not.
void aa_ct_seg_list_plot ( struct aa_ct_seg_list *  list,
size_t  n_q,
double  dt 
)

Plots a segment list with a given resolution.

Pipes commands to gnuplot.

Parameters
listSegment list to plot
n_qNumber of configurations
dtTimestep to plot
struct aa_ct_seg_list* aa_ct_tjq_pb_generate ( struct aa_mem_region reg,
struct aa_ct_pt_list *  list,
struct aa_ct_state limits 
)

Generate a parabolic blend trajectory from a point list.

Parameters
regRegion to allocate from
listPoint list to build segment list from
limitsState structure with dq and ddq kinematic limits
Returns
An allocated segment list describing a parabolic blend trajectory.
struct aa_ct_seg_list* aa_ct_tjX_pb_generate ( struct aa_mem_region reg,
struct aa_ct_pt_list *  list,
struct aa_ct_state limits 
)

Generate a parabolic blend trajectory from a point list.

Parameters
regRegion to allocate from
listPoint list to build segment list from
limitsState structure with dq and ddq kinematic limits
Returns
An allocated segment list describing a parabolic blend trajectory.