-
Notifications
You must be signed in to change notification settings - Fork 0
/
cmdvel2gazebo.h
415 lines (326 loc) · 12.5 KB
/
cmdvel2gazebo.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
//
// Academic License - for use in teaching, academic research, and meeting
// course requirements at degree granting institutions only. Not for
// government, commercial, or other organizational use.
//
// File: cmdvel2gazebo.h
//
// Code generated for Simulink model 'cmdvel2gazebo'.
//
// Model version : 1.73
// Simulink Coder version : 8.12 (R2017a) 16-Feb-2017
// C/C++ source code generated on : Tue May 22 14:50:02 2018
//
// Target selection: ert.tlc
// Embedded hardware selection: Custom Processor->Custom
// Code generation objectives: Unspecified
// Validation result: Not run
//
#ifndef RTW_HEADER_cmdvel2gazebo_h_
#define RTW_HEADER_cmdvel2gazebo_h_
#include <math.h>
#include <string.h>
#include <stddef.h>
#ifndef cmdvel2gazebo_COMMON_INCLUDES_
# define cmdvel2gazebo_COMMON_INCLUDES_
#include "rtwtypes.h"
#include "rtw_continuous.h"
#include "rtw_solver.h"
#include "slros_initialize.h"
#endif // cmdvel2gazebo_COMMON_INCLUDES_
#include "cmdvel2gazebo_types.h"
#include "rtGetInf.h"
#include "rt_nonfinite.h"
#include "rt_defines.h"
// Macros for accessing real-time model data structure
#ifndef rtmGetBlkStateChangeFlag
# define rtmGetBlkStateChangeFlag(rtm) ((rtm)->blkStateChange)
#endif
#ifndef rtmSetBlkStateChangeFlag
# define rtmSetBlkStateChangeFlag(rtm, val) ((rtm)->blkStateChange = (val))
#endif
#ifndef rtmGetContStateDisabled
# define rtmGetContStateDisabled(rtm) ((rtm)->contStateDisabled)
#endif
#ifndef rtmSetContStateDisabled
# define rtmSetContStateDisabled(rtm, val) ((rtm)->contStateDisabled = (val))
#endif
#ifndef rtmGetContStates
# define rtmGetContStates(rtm) ((rtm)->contStates)
#endif
#ifndef rtmSetContStates
# define rtmSetContStates(rtm, val) ((rtm)->contStates = (val))
#endif
#ifndef rtmGetDerivCacheNeedsReset
# define rtmGetDerivCacheNeedsReset(rtm) ((rtm)->derivCacheNeedsReset)
#endif
#ifndef rtmSetDerivCacheNeedsReset
# define rtmSetDerivCacheNeedsReset(rtm, val) ((rtm)->derivCacheNeedsReset = (val))
#endif
#ifndef rtmGetIntgData
# define rtmGetIntgData(rtm) ((rtm)->intgData)
#endif
#ifndef rtmSetIntgData
# define rtmSetIntgData(rtm, val) ((rtm)->intgData = (val))
#endif
#ifndef rtmGetOdeF
# define rtmGetOdeF(rtm) ((rtm)->odeF)
#endif
#ifndef rtmSetOdeF
# define rtmSetOdeF(rtm, val) ((rtm)->odeF = (val))
#endif
#ifndef rtmGetOdeY
# define rtmGetOdeY(rtm) ((rtm)->odeY)
#endif
#ifndef rtmSetOdeY
# define rtmSetOdeY(rtm, val) ((rtm)->odeY = (val))
#endif
#ifndef rtmGetPeriodicContStateIndices
# define rtmGetPeriodicContStateIndices(rtm) ((rtm)->periodicContStateIndices)
#endif
#ifndef rtmSetPeriodicContStateIndices
# define rtmSetPeriodicContStateIndices(rtm, val) ((rtm)->periodicContStateIndices = (val))
#endif
#ifndef rtmGetPeriodicContStateRanges
# define rtmGetPeriodicContStateRanges(rtm) ((rtm)->periodicContStateRanges)
#endif
#ifndef rtmSetPeriodicContStateRanges
# define rtmSetPeriodicContStateRanges(rtm, val) ((rtm)->periodicContStateRanges = (val))
#endif
#ifndef rtmGetZCCacheNeedsReset
# define rtmGetZCCacheNeedsReset(rtm) ((rtm)->zCCacheNeedsReset)
#endif
#ifndef rtmSetZCCacheNeedsReset
# define rtmSetZCCacheNeedsReset(rtm, val) ((rtm)->zCCacheNeedsReset = (val))
#endif
#ifndef rtmGetdX
# define rtmGetdX(rtm) ((rtm)->derivs)
#endif
#ifndef rtmSetdX
# define rtmSetdX(rtm, val) ((rtm)->derivs = (val))
#endif
#ifndef rtmGetErrorStatus
# define rtmGetErrorStatus(rtm) ((rtm)->errorStatus)
#endif
#ifndef rtmSetErrorStatus
# define rtmSetErrorStatus(rtm, val) ((rtm)->errorStatus = (val))
#endif
#ifndef rtmGetStopRequested
# define rtmGetStopRequested(rtm) ((rtm)->Timing.stopRequestedFlag)
#endif
#ifndef rtmSetStopRequested
# define rtmSetStopRequested(rtm, val) ((rtm)->Timing.stopRequestedFlag = (val))
#endif
#ifndef rtmGetStopRequestedPtr
# define rtmGetStopRequestedPtr(rtm) (&((rtm)->Timing.stopRequestedFlag))
#endif
#ifndef rtmGetT
# define rtmGetT(rtm) (rtmGetTPtr((rtm))[0])
#endif
// Block signals (auto storage)
typedef struct {
char_T cv0[49];
char_T cv1[48];
SL_Bus_cmdvel2gazebo_geometry_msgs_Twist In1;// '<S14>/In1'
SL_Bus_cmdvel2gazebo_geometry_msgs_Twist varargout_2;
real_T safeValue; // '<S5>/timeout set to 0 output'
real_T r;
real_T rL;
real_T rR;
SL_Bus_cmdvel2gazebo_std_msgs_Float64 BusAssignment3;// '<Root>/Bus Assignment3'
SL_Bus_cmdvel2gazebo_std_msgs_Float64 BusAssignment2;// '<Root>/Bus Assignment2'
SL_Bus_cmdvel2gazebo_std_msgs_Float64 BusAssignment1;// '<Root>/Bus Assignment1'
} B_cmdvel2gazebo_T;
// Block states (auto storage) for system '<Root>'
typedef struct {
real_T TimeStampA; // '<S12>/Derivative'
real_T LastUAtTimeA; // '<S12>/Derivative'
real_T TimeStampB; // '<S12>/Derivative'
real_T LastUAtTimeB; // '<S12>/Derivative'
real_T sinceLastMsg; // '<S5>/timeout set to 0 output'
void *SourceBlock_PWORK; // '<S11>/SourceBlock'
void *SinkBlock_PWORK; // '<S10>/SinkBlock'
void *SinkBlock_PWORK_f; // '<S9>/SinkBlock'
void *SinkBlock_PWORK_h; // '<S8>/SinkBlock'
void *SinkBlock_PWORK_l; // '<S7>/SinkBlock'
robotics_slros_internal_block_T obj; // '<S10>/SinkBlock'
robotics_slros_internal_block_T obj_m;// '<S9>/SinkBlock'
robotics_slros_internal_block_T obj_l;// '<S8>/SinkBlock'
robotics_slros_internal_block_T obj_n;// '<S7>/SinkBlock'
robotics_slros_internal_blo_a_T obj_d;// '<S11>/SourceBlock'
boolean_T sinceLastMsg_not_empty; // '<S5>/timeout set to 0 output'
} DW_cmdvel2gazebo_T;
// Continuous states (auto storage)
typedef struct {
real_T TransferFcn1_CSTATE; // '<S12>/Transfer Fcn1'
real_T TransferFcn2_CSTATE; // '<S12>/Transfer Fcn2'
} X_cmdvel2gazebo_T;
// State derivatives (auto storage)
typedef struct {
real_T TransferFcn1_CSTATE; // '<S12>/Transfer Fcn1'
real_T TransferFcn2_CSTATE; // '<S12>/Transfer Fcn2'
} XDot_cmdvel2gazebo_T;
// State disabled
typedef struct {
boolean_T TransferFcn1_CSTATE; // '<S12>/Transfer Fcn1'
boolean_T TransferFcn2_CSTATE; // '<S12>/Transfer Fcn2'
} XDis_cmdvel2gazebo_T;
#ifndef ODE3_INTG
#define ODE3_INTG
// ODE3 Integration Data
typedef struct {
real_T *y; // output
real_T *f[3]; // derivatives
} ODE3_IntgData;
#endif
// Parameters (auto storage)
struct P_cmdvel2gazebo_T_ {
real_T DeadMansSwitch_stepSize; // Mask Parameter: DeadMansSwitch_stepSize
// Referenced by: '<S5>/Simulate step size'
real_T DeadMansSwitch_timeout; // Mask Parameter: DeadMansSwitch_timeout
// Referenced by: '<S5>/Timeout in seconds'
SL_Bus_cmdvel2gazebo_geometry_msgs_Twist Out1_Y0;// Computed Parameter: Out1_Y0
// Referenced by: '<S14>/Out1'
SL_Bus_cmdvel2gazebo_geometry_msgs_Twist Constant_Value;// Computed Parameter: Constant_Value
// Referenced by: '<S11>/Constant'
real_T TransferFcn1_A; // Computed Parameter: TransferFcn1_A
// Referenced by: '<S12>/Transfer Fcn1'
real_T TransferFcn1_C; // Computed Parameter: TransferFcn1_C
// Referenced by: '<S12>/Transfer Fcn1'
real_T TransferFcn2_A; // Computed Parameter: TransferFcn2_A
// Referenced by: '<S12>/Transfer Fcn2'
real_T TransferFcn2_C; // Computed Parameter: TransferFcn2_C
// Referenced by: '<S12>/Transfer Fcn2'
real_T Switch_Threshold; // Expression: 0
// Referenced by: '<S12>/Switch'
real_T GazeboMultiplier_Gain; // Expression: 2.8101
// Referenced by: '<Root>/Gazebo Multiplier'
real_T WheelbaseL_Value; // Expression: 2.62
// Referenced by: '<Root>/Wheelbase, L'
real_T CartreadT_Value; // Expression: 1.301
// Referenced by: '<Root>/Car tread, T'
real_T maxsteerInside_Value; // Expression: 0.6
// Referenced by: '<Root>/maxsteerInside'
SL_Bus_cmdvel2gazebo_std_msgs_Float64 Constant_Value_a;// Computed Parameter: Constant_Value_a
// Referenced by: '<S1>/Constant'
SL_Bus_cmdvel2gazebo_std_msgs_Float64 Constant_Value_h;// Computed Parameter: Constant_Value_h
// Referenced by: '<S2>/Constant'
SL_Bus_cmdvel2gazebo_std_msgs_Float64 Constant_Value_j;// Computed Parameter: Constant_Value_j
// Referenced by: '<S3>/Constant'
SL_Bus_cmdvel2gazebo_std_msgs_Float64 Constant_Value_h5;// Computed Parameter: Constant_Value_h5
// Referenced by: '<S4>/Constant'
};
// Real-time Model Data Structure
struct tag_RTM_cmdvel2gazebo_T {
const char_T *errorStatus;
RTWSolverInfo solverInfo;
X_cmdvel2gazebo_T *contStates;
int_T *periodicContStateIndices;
real_T *periodicContStateRanges;
real_T *derivs;
boolean_T *contStateDisabled;
boolean_T zCCacheNeedsReset;
boolean_T derivCacheNeedsReset;
boolean_T blkStateChange;
real_T odeY[2];
real_T odeF[3][2];
ODE3_IntgData intgData;
//
// Sizes:
// The following substructure contains sizes information
// for many of the model attributes such as inputs, outputs,
// dwork, sample times, etc.
struct {
int_T numContStates;
int_T numPeriodicContStates;
int_T numSampTimes;
} Sizes;
//
// Timing:
// The following substructure contains information regarding
// the timing information for the model.
struct {
uint32_T clockTick0;
uint32_T clockTickH0;
time_T stepSize0;
uint32_T clockTick1;
uint32_T clockTickH1;
SimTimeStep simTimeStep;
boolean_T stopRequestedFlag;
time_T *t;
time_T tArray[2];
} Timing;
};
// Block parameters (auto storage)
#ifdef __cplusplus
extern "C" {
#endif
extern P_cmdvel2gazebo_T cmdvel2gazebo_P;
#ifdef __cplusplus
}
#endif
// Block signals (auto storage)
extern B_cmdvel2gazebo_T cmdvel2gazebo_B;
// Continuous states (auto storage)
extern X_cmdvel2gazebo_T cmdvel2gazebo_X;
// Block states (auto storage)
extern DW_cmdvel2gazebo_T cmdvel2gazebo_DW;
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
// Model entry point functions
extern void cmdvel2gazebo_initialize(void);
extern void cmdvel2gazebo_step(void);
extern void cmdvel2gazebo_terminate(void);
#ifdef __cplusplus
}
#endif
// Real-time Model object
#ifdef __cplusplus
extern "C" {
#endif
extern RT_MODEL_cmdvel2gazebo_T *const cmdvel2gazebo_M;
#ifdef __cplusplus
}
#endif
//-
// The generated code includes comments that allow you to trace directly
// back to the appropriate location in the model. The basic format
// is <system>/block_name, where system is the system number (uniquely
// assigned by Simulink) and block_name is the name of the block.
//
// Use the MATLAB hilite_system command to trace the generated code back
// to the model. For example,
//
// hilite_system('<S3>') - opens system 3
// hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3
//
// Here is the system hierarchy for this model
//
// '<Root>' : 'cmdvel2gazebo'
// '<S1>' : 'cmdvel2gazebo/Blank Message'
// '<S2>' : 'cmdvel2gazebo/Blank Message1'
// '<S3>' : 'cmdvel2gazebo/Blank Message2'
// '<S4>' : 'cmdvel2gazebo/Blank Message3'
// '<S5>' : 'cmdvel2gazebo/Dead Man's Switch'
// '<S6>' : 'cmdvel2gazebo/MATLAB Function'
// '<S7>' : 'cmdvel2gazebo/Publish'
// '<S8>' : 'cmdvel2gazebo/Publish1'
// '<S9>' : 'cmdvel2gazebo/Publish2'
// '<S10>' : 'cmdvel2gazebo/Publish3'
// '<S11>' : 'cmdvel2gazebo/Subscribe'
// '<S12>' : 'cmdvel2gazebo/Velocity Dynamics'
// '<S13>' : 'cmdvel2gazebo/Dead Man's Switch/timeout set to 0 output'
// '<S14>' : 'cmdvel2gazebo/Subscribe/Enabled Subsystem'
#endif // RTW_HEADER_cmdvel2gazebo_h_
//
// File trailer for generated code.
//
// [EOF]
//