amino  1.0-beta2
Lightweight Robot Utility Library
rx_ct.h
Go to the documentation of this file.
1 /* -*- mode: C; c-basic-offset: 4; -*- */
2 /* ex: set shiftwidth=4 tabstop=4 expandtab: */
3 /*
4  * Copyright (c) 2017, Rice University
5  * Copyright (c) 2018, Colorado School of Mines
6  * All rights reserved.
7  *
8  * Author(s): Neil T. Dantam <ndantam@mines.edu>
9  *
10  * Redistribution and use in source and binary forms, with or
11  * without modification, are permitted provided that the following
12  * conditions are met:
13  * * Redistributions of source code must retain the above copyright
14  * notice, this list of conditions and the following disclaimer.
15  * * Redistributions in binary form must reproduce the above
16  * copyright notice, this list of conditions and the following
17  * disclaimer in the documentation and/or other materials provided
18  * with the distribution.
19  * * Neither the name of copyright holder the names of its
20  * contributors may be used to endorse or promote products derived
21  * from this software without specific prior written permission.
22  *
23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
24  * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
25  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
26  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
28  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
30  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
31  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
32  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
34  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35  * POSSIBILITY OF SUCH DAMAGE.
36  *
37  */
38 
39 #ifndef AMINO_RX_CT_H
40 #define AMINO_RX_CT_H
41 
47 #include "amino/ct/state.h"
48 #include "amino/ct/traj.h"
49 
58 AA_API struct aa_ct_pt_list *
60  size_t n_q, size_t n_path, double *path );
61 
62 
69 AA_API struct aa_ct_limit *
70 aa_rx_ct_limits( struct aa_mem_region *region, const struct aa_rx_sg *sg );
71 
72 
73 AA_API int
74 aa_rx_ct_tjx_path( struct aa_mem_region *region,
75  const struct aa_rx_ik_parm *opts,
76  const struct aa_rx_sg_sub *ssg,
77  struct aa_ct_seg_list *segs,
78  size_t n_q_all, const double *q_start_all,
79  size_t *n_points, double **path );
80 
81 
82 AA_API struct aa_ct_limit *
83 aa_rx_ct_sg_limits( struct aa_mem_region *region, const struct aa_rx_sg *sg );
84 
89 struct aa_rx_ct_wk_opts;
90 
94 AA_API struct aa_rx_ct_wk_opts *
96 
100 AA_API void
102 
103 
114 AA_API void
116  const double *E_act, const double *E_ref,
117  double *dx );
118 
132 AA_API int
133 aa_rx_ct_wk_dx2dq( const struct aa_rx_sg_sub *ssg,
134  const struct aa_rx_ct_wk_opts * opts,
135  size_t n_tf, const double *TF_abs, size_t ld_tf,
136  size_t n_x, const double *dx,
137  size_t n_q, double *dq );
138 
156 AA_API int
157 aa_rx_ct_wk_dx2dq_np( const struct aa_rx_sg_sub *ssg,
158  const struct aa_rx_ct_wk_opts * opts,
159  size_t n_tf, const double *TF_abs, size_t ld_tf,
160  size_t n_x, const double *dx,
161  size_t n_q, const double *dq_r, double *dq );
162 
163 
175 struct aa_rx_ct_wk_lc3_cx;
176 
177 AA_API struct aa_rx_ct_wk_lc3_cx *
178 aa_rx_ct_wk_lc3_create ( const struct aa_rx_sg_sub *ssg,
179  const struct aa_rx_ct_wk_opts * opts );
180 
181 AA_API int
182 aa_rx_ct_wk_dx2dq_lc3( const struct aa_rx_ct_wk_lc3_cx *lc3,
183  double dt,
184  size_t n_tf, const double *TF_abs, size_t ld_tf,
185  size_t n_x, const double *dx_r,
186  size_t n_q,
187  const double *q_a, const double *dq_a,
188  const double *dq_r, double *dq );
189 
199 AA_API void
200 aa_rx_ct_wk_dqcenter( const struct aa_rx_sg_sub *ssg,
201  const struct aa_rx_ct_wk_opts * opts,
202  size_t n_q, const double *q, double *dq_r );
203 
204 
205 #endif /*AMINO_RX_CT_H*/
#define AA_API
calling and name mangling convention for functions
Definition: amino.h:95
AA_API void aa_rx_ct_wk_opts_destroy(struct aa_rx_ct_wk_opts *)
Destroy workspce control options.
AA_API int aa_rx_ct_wk_dx2dq(const struct aa_rx_sg_sub *ssg, const struct aa_rx_ct_wk_opts *opts, size_t n_tf, const double *TF_abs, size_t ld_tf, size_t n_x, const double *dx, size_t n_q, double *dq)
Convert workspace (Cartesian) velocity to joint velocity.
AA_API struct aa_ct_limit * aa_rx_ct_limits(struct aa_mem_region *region, const struct aa_rx_sg *sg)
Extract the limits from a scene graph.
AA_API struct aa_rx_ct_wk_opts * aa_rx_ct_wk_opts_create(void)
Create workspce control options.
AA_API struct aa_ct_pt_list * aa_rx_ct_pt_list(struct aa_mem_region *region, size_t n_q, size_t n_path, double *path)
Return a point list for a path.
AA_API void aa_rx_ct_wk_dx_pos(const struct aa_rx_ct_wk_opts *opts, const double *E_act, const double *E_ref, double *dx)
Proportional control on pose error.
AA_API void aa_rx_ct_wk_dqcenter(const struct aa_rx_sg_sub *ssg, const struct aa_rx_ct_wk_opts *opts, size_t n_q, const double *q, double *dq_r)
Find joint-centering reference velocity.
AA_API int aa_rx_ct_wk_dx2dq_np(const struct aa_rx_sg_sub *ssg, const struct aa_rx_ct_wk_opts *opts, size_t n_tf, const double *TF_abs, size_t ld_tf, size_t n_x, const double *dx, size_t n_q, const double *dq_r, double *dq)
Convert workspace (Cartesian) velocity to joint velocity, with nullspace projection.
Limits on robot state.
Definition: state.h:75
Data Structure for Region-Based memory allocation.
Definition: mem.h:199
Opaque context struct for LC3.
Opaque structure for workspace control options.
Opaque type for a scene_graph.