amino  1.0-beta2
Lightweight Robot Utility Library
scene_wk.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) 2018, Colorado School of Mines
5  * All rights reserved.
6  *
7  * Author(s): Neil T. Dantam <ndantam@mines.edu>
8  *
9  * Redistribution and use in source and binary forms, with or
10  * without modification, are permitted provided that the following
11  * conditions are met:
12  * * Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  * * Redistributions in binary form must reproduce the above
15  * copyright notice, this list of conditions and the following
16  * disclaimer in the documentation and/or other materials provided
17  * with the distribution.
18  * * Neither the name of copyright holder the names of its
19  * contributors may be used to endorse or promote products derived
20  * from this software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
23  * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
24  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
25  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
27  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
30  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
31  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
33  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34  * POSSIBILITY OF SUCH DAMAGE.
35  *
36  */
37 
38 #ifndef AMINO_RX_SCENE_WK_H
39 #define AMINO_RX_SCENE_WK_H
40 
50 struct aa_rx_wk_opts;
51 
55 AA_API struct aa_rx_wk_opts *
57 
61 AA_API void
63 
64 
75 AA_API void
76 aa_rx_wk_dx_pos( const struct aa_rx_wk_opts * opts,
77  const double *E_act, const double *E_ref,
78  struct aa_dvec *dx );
79 
91 AA_API int
92 aa_rx_wk_dx2dq( const struct aa_rx_sg_sub *ssg,
93  const struct aa_rx_wk_opts * opts,
94  const struct aa_rx_fk *fk,
95  const struct aa_dvec *dx,
96  struct aa_dvec *dq );
97 
113 AA_API int
114 aa_rx_wk_dx2dq_np( const struct aa_rx_sg_sub *ssg,
115  const struct aa_rx_wk_opts * opts,
116  const struct aa_rx_fk *fk,
117  const struct aa_dvec *dx, const struct aa_dvec *dq_r,
118  struct aa_dvec *dq );
119 
120 
132 struct aa_rx_wk_lc3_cx;
133 
134 AA_API struct aa_rx_wk_lc3_cx *
135 aa_rx_wk_lc3_create ( const struct aa_rx_sg_sub *ssg,
136  const struct aa_rx_wk_opts * opts );
137 
138 
139 AA_API int
140 aa_rx_wk_dx2dq_lc3( const struct aa_rx_wk_lc3_cx *lc3,
141  double dt,
142  const struct aa_rx_fk *fk,
143  const struct aa_dvec *dx_r,
144  const struct aa_dvec *q_a, const struct aa_dvec *dq_a,
145  const struct aa_dvec *dq_r, struct aa_dvec *dq );
146 
156 AA_API void
157 aa_rx_wk_dqcenter( const struct aa_rx_sg_sub *ssg,
158  const struct aa_rx_wk_opts * opts,
159  const struct aa_dvec *q,
160  struct aa_dvec *dq_r );
161 
162 
163 #endif /*AMINO_RX_SCENE_WK_H*/
#define AA_API
calling and name mangling convention for functions
Definition: amino.h:95
AA_API int aa_rx_wk_dx2dq_np(const struct aa_rx_sg_sub *ssg, const struct aa_rx_wk_opts *opts, const struct aa_rx_fk *fk, const struct aa_dvec *dx, const struct aa_dvec *dq_r, struct aa_dvec *dq)
Convert workspace (Cartesian) velocity to joint velocity, with nullspace projection.
AA_API void aa_rx_wk_opts_destroy(struct aa_rx_wk_opts *)
Destroy workspce control options.
AA_API void aa_rx_wk_dx_pos(const struct aa_rx_wk_opts *opts, const double *E_act, const double *E_ref, struct aa_dvec *dx)
Proportional control on pose error.
AA_API void aa_rx_wk_dqcenter(const struct aa_rx_sg_sub *ssg, const struct aa_rx_wk_opts *opts, const struct aa_dvec *q, struct aa_dvec *dq_r)
Find joint-centering reference velocity.
AA_API struct aa_rx_wk_opts * aa_rx_wk_opts_create(void)
Create workspce control options.
AA_API int aa_rx_wk_dx2dq(const struct aa_rx_sg_sub *ssg, const struct aa_rx_wk_opts *opts, const struct aa_rx_fk *fk, const struct aa_dvec *dx, struct aa_dvec *dq)
Convert workspace (Cartesian) velocity to joint velocity.
Descriptor for a vector.
Definition: mat.h:63
Opaque context struct for LC3.
Opaque structure for workspace control options.