tmkit  0.0.1-alpha1
A Task-Motion Planning Framework
 All Data Structures Files Functions Enumerations Enumerator Pages
tmplan.h
Go to the documentation of this file.
1 #ifndef TMPLAN_H
2 #define TMPLAN_H
3 
17 };
18 
19 
25 struct tmplan;
26 
34 AA_API struct tmplan *
35 tmplan_create (struct aa_mem_region *reg);
36 
42 AA_API void
43 tmplan_finish_op(struct tmplan * tmp );
44 
53 AA_API void
54 tmplan_add_op(struct tmplan * tmp, void *op);
55 
59 AA_API void
60 tmplan_add_action(struct tmplan * tmp);
61 
65 AA_API void
66 tmplan_add_motion_plan(struct tmplan * tmp);
67 
71 AA_API void
72 tmplan_add_reparent(struct tmplan * tmp);
73 
80 struct tmplan_op;
81 
87 AA_API struct tmplan_op *
88 tmplan_last_op(struct tmplan * tmp);
89 
93 AA_API enum tmplan_op_type
94 tmplan_op_type( const struct tmplan_op *op );
95 
101 struct tmplan_op_action;
102 
106 AA_API void
107 tmplan_op_action_set (struct tmplan_op_action *op, const char *value );
108 
112 AA_API const char *
113 tmplan_op_action_get (const struct tmplan_op_action *op );
114 
120 struct tmplan_op_motion_plan;
121 
125 AA_API void
126 tmplan_op_motion_plan_add_var (struct tmplan_op_motion_plan *op, const char *name);
127 
131 AA_API void
133  void (*function)(void *cx, const char *name),
134  void *cx);
135 
139 AA_API int
140 tmplan_map_ops (const struct tmplan *tmp,
141  void (*function)(void *cx, const struct tmplan_op *op),
142  void *cx );
143 
147 AA_API void
149 
153 AA_API void
155 
159 AA_API void
161 
165 AA_API double *
167 
172 AA_API size_t
174 
182 AA_API size_t
184 
190 struct tmplan_op_reparent;
191 
195 AA_API void
196 tmplan_op_reparent_set_frame (struct tmplan_op_reparent *op, const char *frame);
197 
201 AA_API void
202 tmplan_op_reparent_set_new_parent (struct tmplan_op_reparent *op, const char *frame);
203 
207 AA_API const char*
208 tmplan_op_reparent_get_frame (struct tmplan_op_reparent *op);
209 
213 AA_API const char*
214 tmplan_op_reparent_get_new_parent (struct tmplan_op_reparent *op);
215 
219 AA_API struct tmplan*
220 tmplan_parse_filename (const char *filename, struct aa_mem_region *reg);
221 
225 AA_API struct tmplan*
226 tmplan_parse_file (FILE *in, struct aa_mem_region *reg);
227 
228 
232 AA_API int
233 tmplan_write (const struct tmplan *tmp, FILE *out );
234 
235 #endif /* TMPLAN_H*/
A motion plan.
Definition: tmplan.h:15
AA_API void tmplan_op_motion_plan_add_var(struct tmplan_op_motion_plan *op, const char *name)
Add a new configuration variable to the motion plan.
A scene-graph reparenting.
Definition: tmplan.h:16
Opaque type for a task action.
AA_API void tmplan_add_action(struct tmplan *tmp)
Add a task operator to the plan.
AA_API int tmplan_write(const struct tmplan *tmp, FILE *out)
Write a tmplan to `out'.
AA_API const char * tmplan_op_reparent_get_new_parent(struct tmplan_op_reparent *op)
Get the new parent.
AA_API size_t tmplan_op_motion_plan_path_size(struct tmplan_op_motion_plan *op)
Return the number of elements in the path.
AA_API void tmplan_op_motion_plan_path_start(struct tmplan_op_motion_plan *op)
Preprate to add points to the motion plan.
A task action.
Definition: tmplan.h:14
AA_API const char * tmplan_op_action_get(const struct tmplan_op_action *op)
Get the value of the task action, represented as a string.
AA_API void tmplan_op_reparent_set_new_parent(struct tmplan_op_reparent *op, const char *frame)
Set the new parent.
AA_API void tmplan_op_action_set(struct tmplan_op_action *op, const char *value)
Set the value of the task action, represented as a string.
AA_API const char * tmplan_op_reparent_get_frame(struct tmplan_op_reparent *op)
Get the frame being reparented.
AA_API void tmplan_finish_op(struct tmplan *tmp)
Finalize the last added operator.
AA_API size_t tmplan_op_motion_plan_config_count(struct tmplan_op_motion_plan *op)
Return the number of configuration variables used for the path.
AA_API void tmplan_op_motion_plan_map_var(struct tmplan_op_motion_plan *op, void(*function)(void *cx, const char *name), void *cx)
Apply function to each configuration variable name in the motion plan.
Opaque structure for a task operator.
Opaque structure for a task-motion plan.
tmplan_op_type
Types of operators in a task-motion plan.
Definition: tmplan.h:13
AA_API int tmplan_map_ops(const struct tmplan *tmp, void(*function)(void *cx, const struct tmplan_op *op), void *cx)
Apply function to each op in the plan.
AA_API struct tmplan * tmplan_parse_file(FILE *in, struct aa_mem_region *reg)
Parse a plan file, allocation out of the given region.
AA_API struct tmplan * tmplan_create(struct aa_mem_region *reg)
Create a new task-motion plan allocated out of the given region.
AA_API void tmplan_add_reparent(struct tmplan *tmp)
Add a reparent operator to the plan.
AA_API void tmplan_op_motion_plan_path_finish(struct tmplan_op_motion_plan *op)
Finalize the motion plan path.
AA_API void tmplan_op_reparent_set_frame(struct tmplan_op_reparent *op, const char *frame)
Set the frame being reparented.
AA_API struct tmplan_op * tmplan_last_op(struct tmplan *tmp)
Return a pointer to the last added operator.
AA_API void tmplan_add_op(struct tmplan *tmp, void *op)
Add a new operator to the plan.
AA_API void tmplan_op_motion_plan_path_add(struct tmplan_op_motion_plan *op, double x)
Add the next waypoint configuration value to the motion plan.
AA_API double * tmplan_op_motion_plan_path(struct tmplan_op_motion_plan *op)
Return a pointer to the path data.
Opaque type for a motion plan.
AA_API struct tmplan * tmplan_parse_filename(const char *filename, struct aa_mem_region *reg)
Parse a plan file, allocation out of the given region.
AA_API void tmplan_add_motion_plan(struct tmplan *tmp)
Add a motion plan to the plan.