Kuon  1.1.3
RoadNarrows Robotics Large Outdoor Mobile Robot Project
bsKuon.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////////////
2 //
3 // Package: kuon
4 //
5 // File: bsKuon.h
6 //
7 /*! \file
8  *
9  * $LastChangedDate: 2011-01-13 11:05:37 -0700 (Thu, 13 Jan 2011) $
10  * $Rev: 657 $
11  *
12  * \brief \h_botsense bsProxy client library Kuon robot interface.
13  *
14  * \author Robin Knight (robin.knight@roadnarrows.com)
15  *
16  * \copyright
17  * \h_copy 2010-2017. RoadNarrows LLC.\n
18  * http://www.roadnarrows.com\n
19  * All Rights Reserved
20  */
21 // Permission is hereby granted, without written agreement and without
22 // license or royalty fees, to use, copy, modify, and distribute this
23 // software and its documentation for any purpose, provided that
24 // (1) The above copyright notice and the following two paragraphs
25 // appear in all copies of the source code and (2) redistributions
26 // including binaries reproduces these notices in the supporting
27 // documentation. Substantial modifications to this software may be
28 // copyrighted by their authors and need not follow the licensing terms
29 // described here, provided that the new terms are clearly indicated in
30 // all files where they apply.
31 //
32 // IN NO EVENT SHALL THE AUTHOR, ROADNARROWS LLC, OR ANY MEMBERS/EMPLOYEES
33 // OF ROADNARROW LLC OR DISTRIBUTORS OF THIS SOFTWARE BE LIABLE TO ANY
34 // PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
35 // DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION,
36 // EVEN IF THE AUTHORS OR ANY OF THE ABOVE PARTIES HAVE BEEN ADVISED OF
37 // THE POSSIBILITY OF SUCH DAMAGE.
38 //
39 // THE AUTHOR AND ROADNARROWS LLC SPECIFICALLY DISCLAIM ANY WARRANTIES,
40 // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
41 // FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN
42 // "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO
43 // PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
44 //
45 ////////////////////////////////////////////////////////////////////////////////
46 
47 #ifndef _BSKUON_H
48 #define _BSKUON_H
49 
50 #include "rnr/rnrconfig.h"
51 
52 #include "botsense/BotSense.h"
53 #include "botsense/libBotSense.h"
54 
55 #include "Kuon/kuon.h"
56 
57 #ifndef SWIG
58 C_DECLS_BEGIN
59 #endif // SWIG
60 
61 #define BS_KUON_DEV_NAME "/kuon" ///< Kuon robot device
62 
63 #define BS_KUON_SERVER_MOD "libbsserver_kuon" ///< server plugin dll module
64 #define BS_KUON_CLIENT_LIB "libbsclient_kuon" ///< client app library
65 
66 /*!
67  * \ingroup kuon_types
68  * Motor Configuration Structure
69  */
70 typedef struct
71 {
72  int m_nMaxBwdSpeed; ///< maximum backward current/raw speed limit \h_le 0
73  int m_nMaxFwdSpeed; ///< maximum forward current/raw speed limit \h_ge 0
74  int m_nMinOdometer; ///< minimum current/raw odometer position limit \h_le 0
75  int m_nMaxOdometer; ///< maximum current/raw odometer position limit \h_ge 0
77 
78 /*!
79  * \ingroup kuon_types
80  * Motor IMU Structure
81  */
82 typedef struct
83 {
84  float m_fAccX; ///< acceleration in the x direction
85  float m_fAccY; ///< acceleration in the x direction
86  float m_fAccZ; ///< acceleration in the x direction
87  float m_fGyrX; ///< rotation about the x-axis
88  float m_fGyrY; ///< rotation about the y-axis
89  float m_fGyrZ; ///< rotation about the z-axis
90  float m_fTemp; ///< temperature
91 } KuonImu_T;
92 
93 
94 extern const char *bsKuonGetMsgName(BsClient_P pClient,
95  BsVConnHnd_T hndVConn,
96  uint_t uMsgId);
97 
98 extern int bsKuonReqOpen( BsClient_P pClient,
99  const char* dev1,
100  const char* dev2,
101  bool_t server,
102  bool_t bInitTrace);
103 
104 extern int bsKuonReqClose(BsClient_P pClient, BsVConnHnd_T hndVConn);
105 
106 extern int bsKuonReqSetMotorSpeeds(BsClient_P pClient,
107  BsVConnHnd_T hndVConn,
108  int nSpeedLeft,
109  int nSpeedRight);
110 
111 extern int bsKuonReqGetMotorSpeeds(BsClient_P pClient,
112  BsVConnHnd_T hndVConn,
113  int *pnSpeedLeft,
114  int *pnSpeedRight);
115 
116 extern int bsKuonReqAlterBrake(BsClient_P pClient,
117  BsVConnHnd_T hndVConn,
118  int pnbrakeFL,
119  int pnbrakeFR,
120  int pnbrakeRL,
121  int pnbrakeRR);
122 
123 extern int bsKuonReqAlterSlew(BsClient_P pClient,
124  BsVConnHnd_T hndVConn,
125  int pnslewFL,
126  int pnslewFR,
127  int pnslewRL,
128  int pnslewRR);
129 
130 
131 extern int bsKuonReqReadImu(BsClient_P pClient,
132  BsVConnHnd_T hndVConn,
133  KuonImu_T *pImu);
134 
135 extern int bsKuonReqReadImuDecoupAngles(BsClient_P pClient,
136  BsVConnHnd_T hndVConn,
137  float *pHeading,
138  float *pPitch,
139  float *pRoll);
140 
141 extern int bsKuonReqZeroOutImuGyros(BsClient_P pClient, BsVConnHnd_T hndVConn);
142 
143 extern int bsKuonReqStop(BsClient_P pClient, BsVConnHnd_T hndVConn);
144 
145 extern int bsKuonReqGetMotorCfg(BsClient_P pClient,
146  BsVConnHnd_T hndVConn,
147  uint_t uWhich,
148  KuonMotorCfg_T *pMotorCfg);
149 
150 extern int bsKuonReqSetMotorCfg(BsClient_P pClient,
151  BsVConnHnd_T hndVConn,
152  uint_t uWhich,
153  KuonMotorCfg_T *pMotorCfg);
154 
155 extern int bsKuonReqGetFwVer(BsClient_P pClient,
156  BsVConnHnd_T hndVConn,
157  uint_t *puVersion,
158  uint_t *puRevision);
159 
160 #ifndef SWIG
161 C_DECLS_END
162 #endif // SWIG
163 
164 #endif // _BSKUON_H
int m_nMaxBwdSpeed
maximum backward current/raw speed limit &le; 0
Definition: bsKuon.h:72
float m_fGyrY
rotation about the y-axis
Definition: bsKuon.h:88
int m_nMinOdometer
minimum current/raw odometer position limit &le; 0
Definition: bsKuon.h:74
int m_nMaxOdometer
maximum current/raw odometer position limit &ge; 0
Definition: bsKuon.h:75
float m_fAccY
acceleration in the x direction
Definition: bsKuon.h:85
float m_fGyrX
rotation about the x-axis
Definition: bsKuon.h:87
RoadNarrows Kuon robot top-level header file.
float m_fAccX
acceleration in the x direction
Definition: bsKuon.h:84
float m_fGyrZ
rotation about the z-axis
Definition: bsKuon.h:89
int m_nMaxFwdSpeed
maximum forward current/raw speed limit &ge; 0
Definition: bsKuon.h:73
float m_fTemp
temperature
Definition: bsKuon.h:90
float m_fAccZ
acceleration in the x direction
Definition: bsKuon.h:86