# -*- makefile -*-
-SUBDIRS = eb2007 eb2008 test utils
+SUBDIRS = eb2008 test utils
// to reference position.
robot_set_act_pos_notrans(ref_pos.x, ref_pos.y, ref_pos.phi);
#endif
- ROBOT_LOCK(act_pos);
- act_pos.x = robot.act_pos.x;
- act_pos.y = robot.act_pos.y;
- act_pos.phi = robot.act_pos.phi;
- ROBOT_UNLOCK(act_pos);
+ ROBOT_LOCK(ref_pos);
+ ref_pos.x = robot.ref_pos.x;
+ ref_pos.y = robot.ref_pos.y;
+ ref_pos.phi = robot.ref_pos.phi;
+ ROBOT_UNLOCK(ref_pos);
DBG("rx=%5.02f ry=%5.02f, rphi=%4.0f v=%-4.02f omega=%-4.02f\r", ref_pos.x, ref_pos.y, ref_pos.phi/M_PI*180, ref_pos.v, ref_pos.omega);
fflush(stdout);
// Call the controller
double error;
- error = balet(ref_pos, act_pos, k, balet_out);
+ error = balet(ref_pos, ref_pos, k, balet_out);
speeds[0] = balet_out.v - ROBOT_ROTATION_RADIUS_M*balet_out.omega;
speeds[1] = balet_out.v + ROBOT_ROTATION_RADIUS_M*balet_out.omega;
notify_fsm(done, error);
static void obstacle_detected_at(double x, double y)
{
int i,j, xcell, ycell;
- struct act_pos_type act_pos;
+ struct ref_pos_type ref_pos;
struct map *map = ShmapIsMapInit();
double xx, yy;
bool obs_already_seen;
* cell between them, the path will be recalculated. @see
* #OBS_CSPACE. */
- ROBOT_LOCK(act_pos);
- act_pos = robot.act_pos;
- ROBOT_UNLOCK(act_pos);
+ ROBOT_LOCK(ref_pos);
+ ref_pos = robot.ref_pos;
+ ROBOT_UNLOCK(ref_pos);
for (i=(xcell-OBS_AREA); i <= xcell+OBS_AREA; i++) {
for (j=(ycell- OBS_AREA); j <=ycell + OBS_AREA; j++) {
if (!ShmapIsCellInMap(i, j)) continue;
ShmapCell2Point(i, j, &xx, &yy);
- if (distance(xx, yy, act_pos.x, act_pos.y) > 0.2) {
+ if (distance(xx, yy, ref_pos.x, ref_pos.y) > 0.2) {
if (i==xcell && j==ycell)
map->cells[ycell][xcell].flags |= MAP_FLAG_DET_OBST;
map->cells[j][i].detected_obstacle = MAP_NEW_OBSTACLE;
#define NUM_SHARPS 3
double val[NUM_SHARPS], x, y;
//Pos p;
- struct act_pos_type p;
+ struct ref_pos_type p;
int i;
while (1) {
for (i=0; i<NUM_SHARPS; i++) {
if(val[i] < OBS_OFFSET) {
/** Get actual position. */
- ROBOT_LOCK(act_pos);
- p = robot.act_pos;
- ROBOT_UNLOCK(act_pos);
+ ROBOT_LOCK(ref_pos);
+ p = robot.ref_pos;
+ ROBOT_UNLOCK(ref_pos);
/**
* The obstacle cell its calulated as (val*cos(p.phi)) + p.x) and ((val*sin(p.phi)) + p.y)
* where p is actual position and val is the value of the sensors in milimiters. Then ShmapPoint2Cell_X() and
*/
static int new_goal(void)
{
- struct act_pos_type goal;
+ struct ref_pos_type goal;
double startx, starty, angle;
PathPoint * path = NULL;
PathPoint * tmp_point = NULL;
//tc.maxacc *= 2.5;
/// Get actual position.
- ROBOT_LOCK(act_pos);
- startx = robot.act_pos.x;
- starty = robot.act_pos.y;
+ ROBOT_LOCK(ref_pos);
+ startx = robot.ref_pos.x;
+ starty = robot.ref_pos.y;
start.x = startx;
start.y = starty;
- start.phi = robot.act_pos.phi;
+ start.phi = robot.ref_pos.phi;
tc = robot.goal_trajectory_constraints;
- ROBOT_UNLOCK(act_pos);
+ ROBOT_UNLOCK(ref_pos);
/// Get goal position.
ROBOT_LOCK(goal);
goal = robot.goal;
ROBOT_UNLOCK(new_trajectory);
- ROBOT_LOCK(act_pos);
- pos.x = robot.act_pos.x;
- pos.y = robot.act_pos.y;
- pos.phi = robot.act_pos.phi;
- ROBOT_UNLOCK(act_pos);
+ ROBOT_LOCK(est_pos);
+ pos.x = robot.est_pos.x;
+ pos.y = robot.est_pos.y;
+ pos.phi = robot.est_pos.phi;
+ ROBOT_UNLOCK(est_pos);
if (t->prepare(pos)) {
go(t);
if (x>PLAYGROUND_WIDTH_M) x=PLAYGROUND_WIDTH_M;
if (y<0) y=0;
if (y>PLAYGROUND_HEIGHT_M) y=PLAYGROUND_HEIGHT_M;
- ROBOT_LOCK(act_pos);
- robot.act_pos.x = x;
- robot.act_pos.y = y;
- robot.act_pos.phi = phi;
- ROBOT_UNLOCK(act_pos);
+ ROBOT_LOCK(est_pos);
+ robot.est_pos.x = x;
+ robot.est_pos.y = y;
+ robot.est_pos.phi = phi;
+ ROBOT_UNLOCK(est_pos);
}
/**
deltaU = (dk0 + dk1) / 2;
deltAlfa = (dk1 - dk0) / (2.0*ROBOT_ROTATION_RADIUS_MM/1000); // dk1 - dk0
- ROBOT_LOCK(act_pos);
- aktUhel = robot.act_pos.phi;
- ROBOT_UNLOCK(act_pos);
+ /* FIXME */
+/* ROBOT_LOCK(act_pos); */
+/* aktUhel = robot.act_pos.phi; */
+/* ROBOT_UNLOCK(act_pos); */
aktUhel += deltAlfa; // aktualni uhel
double x, y, phi;
- ROBOT_LOCK(act_pos);
- x = robot.act_pos.x + deltaU * cos(aktUhel);
- y = robot.act_pos.y + deltaU * sin(aktUhel);
- phi = robot.act_pos.phi = aktUhel;
- ROBOT_UNLOCK(act_pos);
+/* ROBOT_LOCK(act_pos); */
+/* x = robot.act_pos.x + deltaU * cos(aktUhel); */
+/* y = robot.act_pos.y + deltaU * sin(aktUhel); */
+/* phi = robot.act_pos.phi = aktUhel; */
+/* ROBOT_UNLOCK(act_pos); */
robot_set_act_pos_notrans(x, y, phi);
break;
case DEADLINE:
/* Mapping of robot structure fields to locks */
//#define __robot_lock_ lock /* ROBOT_LOCK() */
-#define __robot_lock_act_pos lock_act_pos
+#define __robot_lock_ref_pos lock_ref_pos
#define __robot_lock_est_pos lock
#define __robot_lock_des_pos lock
#define __robot_lock_goal lock
long long cnt;
unsigned char mode;
pthread_mutex_t lock;
- pthread_mutex_t lock_act_pos;
+ pthread_mutex_t lock_ref_pos;
/** Temporary storage for new trajectory. After the trajectory creation is
* finished, this trajectory is submitted to fsmmove. */
/* mcl model */
struct mcl_model mcl;
/* actual position */
- struct act_pos_type act_pos;
+ struct ref_pos_type ref_pos;
/* estimated position */
struct est_pos_type est_pos;
/* goal position */
- struct act_pos_type goal;
+ struct ref_pos_type goal;
struct TrajectoryConstraints goal_trajectory_constraints;
struct final_heading goal_final_heading;
/* move */
- struct act_pos_type move_dpos;
+ struct ref_pos_type move_dpos;
/* orte */
struct laserData_type laser_recv;
break;
case EV_TIMER:
uoled_send_voltage(&robot.gorte.pwr_voltage);
- uoled_send_position(&robot.gorte.act_pos);
+ uoled_send_position(&robot.gorte.est_pos);
ROBOT_LOCK(disp);
if(msg_waiting) {
memcpy(buff, msg, 10);
/* competition time in seconds */
-struct act_pos_type des_pos;
-
-
enum {
LEFT = 0,
RIGHT,
* @param act actual position
* @param pos countered position
*/
-void get_new_pos(struct act_pos_type *act, struct act_pos_type *pos,
+void get_relative_pos(struct est_pos_type *est, struct ref_pos_type *ref,
double l, double phi)
{
- pos->x = act->x + l*cos(act->phi + phi);
- pos->y = act->y + l*sin(act->phi + phi);
-// pos->phi = act->phi + phi;
- pos->phi = phi;
+ ref->x = est->x + l*cos(est->phi + phi);
+ ref->y = est->y + l*sin(est->phi + phi);
+ ref->phi = est->phi + phi;
}
-void robot_goto_point(struct act_pos_type des_pos)
+void robot_goto_point(struct ref_pos_type des_pos)
{
struct TrajectoryConstraints tc = trajectoryConstraintsDefault;
robot_trajectory_add_final_point_notrans(des_pos.x, des_pos.y, NO_TURN());
}
-void robot_go_backward_to_point(struct act_pos_type des_pos)
+void robot_go_backward_to_point(struct ref_pos_type des_pos)
{
struct TrajectoryConstraints tc = trajectoryConstraintsDefault;
* @author Michal Sojka, Jose Maria Martin Laguna
*
*/
+#define DEBUG
#define FSM_MOTION
#include <sys/time.h>
#include <time.h>
// to reference position.
robot_set_act_pos_notrans(ref_pos.x, ref_pos.y, ref_pos.phi);
#endif
- ROBOT_LOCK(act_pos);
- act_pos.x = robot.act_pos.x;
- act_pos.y = robot.act_pos.y;
- act_pos.phi = robot.act_pos.phi;
- ROBOT_UNLOCK(act_pos);
+ ROBOT_LOCK(est_pos);
+ act_pos.x = robot.est_pos.x;
+ act_pos.y = robot.est_pos.y;
+ act_pos.phi = robot.est_pos.phi;
+ ROBOT_UNLOCK(est_pos);
DBG("rx=%5.02f ry=%5.02f, rphi=%4.0f v=%-4.02f omega=%-4.02f\r", ref_pos.x, ref_pos.y, ref_pos.phi/M_PI*180, ref_pos.v, ref_pos.omega);
fflush(stdout);
static void obstacle_detected_at(double x, double y)
{
int i,j, xcell, ycell;
- struct act_pos_type act_pos;
- struct map *map = ShmapIsMapInit();
+ struct est_pos_type est_pos;
+ struct map *map = robot.map;
double xx, yy;
bool obs_already_seen;
+ if (!map)
+ return;
+
ShmapPoint2Cell(x, y, &xcell, &ycell);
if (!ShmapIsCellInMap(xcell, ycell))
return;
* cell between them, the path will be recalculated. @see
* #OBS_CSPACE. */
- ROBOT_LOCK(act_pos);
- act_pos = robot.act_pos;
- ROBOT_UNLOCK(act_pos);
+ ROBOT_LOCK(est_pos);
+ est_pos = robot.est_pos;
+ ROBOT_UNLOCK(est_pos);
for (i=(xcell-OBS_AREA); i <= xcell+OBS_AREA; i++) {
for (j=(ycell- OBS_AREA); j <=ycell + OBS_AREA; j++) {
if (!ShmapIsCellInMap(i, j)) continue;
ShmapCell2Point(i, j, &xx, &yy);
- if (distance(xx, yy, act_pos.x, act_pos.y) > 0.2) {
+ if (distance(xx, yy, est_pos.x, est_pos.y) > 0.2) {
if (i==xcell && j==ycell)
map->cells[ycell][xcell].flags |= MAP_FLAG_DET_OBST;
map->cells[j][i].detected_obstacle = MAP_NEW_OBSTACLE;
#define NUM_SHARPS 3
double val[NUM_SHARPS], x, y;
//Pos p;
- struct act_pos_type p;
+ struct est_pos_type p;
int i;
while (1) {
for (i=0; i<NUM_SHARPS; i++) {
if(val[i] < OBS_OFFSET) {
/** Get actual position. */
- ROBOT_LOCK(act_pos);
- p = robot.act_pos;
- ROBOT_UNLOCK(act_pos);
+ ROBOT_LOCK(est_pos);
+ p = robot.est_pos;
+ ROBOT_UNLOCK(est_pos);
/**
* The obstacle cell its calulated as (val*cos(p.phi)) + p.x) and ((val*sin(p.phi)) + p.y)
* where p is actual position and val is the value of the sensors in milimiters. Then ShmapPoint2Cell_X() and
*/
static int new_goal(void)
{
- struct act_pos_type goal;
+ struct ref_pos_type goal;
double startx, starty, angle;
PathPoint * path = NULL;
PathPoint * tmp_point = NULL;
//tc.maxacc *= 2.5;
/// Get actual position.
- ROBOT_LOCK(act_pos);
- startx = robot.act_pos.x;
- starty = robot.act_pos.y;
+ ROBOT_LOCK(est_pos);
+ startx = robot.est_pos.x;
+ starty = robot.est_pos.y;
start.x = startx;
start.y = starty;
- start.phi = robot.act_pos.phi;
+ start.phi = robot.est_pos.phi;
tc = robot.goal_trajectory_constraints;
- ROBOT_UNLOCK(act_pos);
+ ROBOT_UNLOCK(est_pos);
/// Get goal position.
ROBOT_LOCK(goal);
goal = robot.goal;
ROBOT_UNLOCK(new_trajectory);
- ROBOT_LOCK(act_pos);
- pos.x = robot.act_pos.x;
- pos.y = robot.act_pos.y;
- pos.phi = robot.act_pos.phi;
- ROBOT_UNLOCK(act_pos);
+ ROBOT_LOCK(est_pos);
+ pos.x = robot.est_pos.x;
+ pos.y = robot.est_pos.y;
+ pos.phi = robot.est_pos.phi;
+ ROBOT_UNLOCK(est_pos);
if (t->prepare(pos)) {
go(t);
perror("move_init: pthread_attr_setschedparam(recalc)");
exit(1);
}
- pthread_create(&thr_trajctory_recalc, NULL, trajctory_recalc, NULL);
+ //pthread_create(&thr_trajctory_recalc, NULL, trajctory_recalc, NULL);
// Thread update Map
pthread_attr_init (&tattr);
perror("pthread_attr_setschedparam");
exit(1);
}
- pthread_create(&thr_update_map, NULL, thread_update_map, NULL);
+ //pthread_create(&thr_update_map, NULL, thread_update_map, NULL);
FSM_TRANSITION(wait_for_command);
}
if (x>PLAYGROUND_WIDTH_M) x=PLAYGROUND_WIDTH_M;
if (y<0) y=0;
if (y>PLAYGROUND_HEIGHT_M) y=PLAYGROUND_HEIGHT_M;
- ROBOT_LOCK(act_pos);
- robot.act_pos.x = x;
- robot.act_pos.y = y;
- robot.act_pos.phi = phi;
- ROBOT_UNLOCK(act_pos);
+ ROBOT_LOCK(ref_pos);
+ robot.ref_pos.x = x;
+ robot.ref_pos.y = y;
+ robot.ref_pos.phi = phi;
+ ROBOT_UNLOCK(ref_pos);
+ // FIXME: Initialize MCL estimate
}
/**
#include <movehelper_eb2008.h>
#include <robot_orte.h>
#include <robomath.h>
+#include <map.h>
#define THREAD_PRIO_MOTION 30
#define THREAD_PRIO_MAIN 25
robot.beacon_color = BEACON_BLUE;
pthread_mutex_init(&robot.lock, NULL);
- pthread_mutex_init(&robot.lock_act_pos, NULL);
- pthread_mutex_init(&robot.lock_mcl, NULL);
+ pthread_mutex_init(&robot.lock_ref_pos, NULL);
+ pthread_mutex_init(&robot.lock_est_pos, NULL);
pthread_mutex_init(&robot.lock_meas_angles, NULL);
pthread_mutex_init(&robot.lock_joy_data, NULL);
pthread_mutex_init(&robot.lock_disp, NULL);
printf("We are BLUE!\n");
}
+ robot.map = ShmapInit(1);
+
signal(SIGINT, int_handler);
block_signals();
/* Mapping of robot structure fields to locks */
//#define __robot_lock_ lock /* ROBOT_LOCK() */
-#define __robot_lock_act_pos lock_act_pos
-#define __robot_lock_est_pos lock
+#define __robot_lock_ref_pos lock_ref_pos
+#define __robot_lock_est_pos lock_est_pos
#define __robot_lock_des_pos lock
#define __robot_lock_goal lock
-#define __robot_lock_mcl lock_mcl
#define __robot_lock_joy_data lock_joy_data
#define __robot_lock_meas_angles lock_meas_angles
#define __robot_lock_new_trajectory lock
long long cnt;
unsigned char mode;
pthread_mutex_t lock;
- pthread_mutex_t lock_act_pos;
- pthread_mutex_t lock_mcl;
+ pthread_mutex_t lock_ref_pos;
+ pthread_mutex_t lock_est_pos;
pthread_mutex_t lock_meas_angles;
pthread_mutex_t lock_joy_data;
pthread_mutex_t lock_disp;
struct robo_fsm fsm[FSM_CNT];
/* actual position */
-/* FIXME: What is the difference between act_pos and est_pos? Probably should be renamed to ref_pos. -- MS */
- struct act_pos_type act_pos;
+ struct ref_pos_type ref_pos;
/* estimated position */
struct est_pos_type est_pos;
- /* goal position */
- struct act_pos_type goal;
+ /* goal position */ /* FIXME: Move away */
+ struct ref_pos_type goal;
struct TrajectoryConstraints goal_trajectory_constraints;
struct final_heading goal_final_heading;
- /* move */
- struct act_pos_type move_dpos;
struct motion_irc_type odometry;
struct joy_data_type joy_data;
/* mcl */
struct mcl_model *mcl; /* Pointer to the generic MCL model */
struct mcl_laser laser; /* MCL implementation for laser */
+
+ struct map *map; /* Map for pathplanning (no locking) */
}; /* robot_eb2008 */
extern struct robot_eb2008 robot;
* PUBLISHER CALLBACKS - GENERIC
* ---------------------------------------------------------------------- */
-void send_act_pos_cb(const ORTESendInfo *info, void *vinstance,
+void send_ref_pos_cb(const ORTESendInfo *info, void *vinstance,
void *sendCallBackParam)
{
- struct act_pos_type *instance = (struct act_pos_type *)vinstance;
+ struct ref_pos_type *instance = (struct ref_pos_type *)vinstance;
- ROBOT_LOCK(act_pos);
- *instance = robot.act_pos;
- ROBOT_UNLOCK(act_pos);
+ ROBOT_LOCK(ref_pos);
+ *instance = robot.ref_pos;
+ ROBOT_UNLOCK(ref_pos);
}
void send_est_pos_cb(const ORTESendInfo *info, void *vinstance,
deltaU = (aktk0 + aktk1) / 2;
deltAlfa = (aktk1 - aktk0) / (2.0*ROBOT_ROTATION_RADIUS_M);
- struct mcl_robot_odo odo = {deltaU, 0, deltAlfa};
- ROBOT_LOCK(mcl);
- robot.mcl->predict(robot.mcl, &odo);
- ROBOT_UNLOCK(mcl);
-
+ struct mcl_robot_odo *odo = malloc(sizeof(struct mcl_robot_odo));
+ odo->dx = deltaU;
+ odo->dy = 0;
+ odo->dangle = deltAlfa;
+ FSM_SIGNAL(LOC, EV_ODO_RECEIVED, odo);
break;
case DEADLINE:
printf("ORTE deadline occurred - motion_irc receive\n");
}
}
-void rcv_act_pos_cb(const ORTERecvInfo *info, void *vinstance,
- void *recvCallBackParam)
-{
- struct act_pos_type *instance = (struct act_pos_type *)vinstance;
-
- switch (info->status) {
- case NEW_DATA:
- ROBOT_LOCK(act_pos);
- robot.act_pos = *instance;
- ROBOT_UNLOCK(act_pos);
- break;
- case DEADLINE:
- printf("ORTE deadline occurred - act_pos receive\n");
- break;
- }
-}
-
-void rcv_est_pos_cb(const ORTERecvInfo *info, void *vinstance,
- void *recvCallBackParam)
-{
- struct est_pos_type *instance = (struct est_pos_type *)vinstance;
-
- switch (info->status) {
- case NEW_DATA:
- ROBOT_LOCK(est_pos);
- robot.est_pos = *instance;
- ROBOT_UNLOCK(est_pos);
- break;
- case DEADLINE:
- printf("ORTE deadline occurred - est_pos receive\n");
- break;
- }
-}
-
void rcv_joy_data_cb(const ORTERecvInfo *info, void *vinstance,
void *recvCallBackParam)
{
generic_publisher_motion_irc_create(&robot.gorte, NULL, &robot.gorte);
generic_publisher_motion_speed_create(&robot.gorte, NULL, &robot.gorte);
generic_publisher_motion_status_create(&robot.gorte, NULL, &robot.gorte);
- generic_publisher_act_pos_create(&robot.gorte, send_act_pos_cb, &robot.gorte);
+ generic_publisher_ref_pos_create(&robot.gorte, send_ref_pos_cb, &robot.gorte);
generic_publisher_est_pos_create(&robot.gorte, send_est_pos_cb, &robot.gorte);
generic_publisher_joy_data_create(&robot.gorte, NULL, &robot.gorte);
generic_publisher_pwr_voltage_create(&robot.gorte, NULL, &robot.gorte);
generic_subscriber_motion_irc_create(&robot.gorte, rcv_motion_irc_cb, &robot.gorte);
generic_subscriber_motion_speed_create(&robot.gorte, rcv_motion_speed_cb, &robot.gorte);
generic_subscriber_motion_status_create(&robot.gorte, rcv_motion_status_cb, &robot.gorte);
- generic_subscriber_act_pos_create(&robot.gorte, rcv_act_pos_cb, &robot.gorte);
- generic_subscriber_est_pos_create(&robot.gorte, rcv_est_pos_cb, &robot.gorte);
generic_subscriber_joy_data_create(&robot.gorte, rcv_joy_data_cb, &robot.gorte);
generic_subscriber_pwr_voltage_create(&robot.gorte, rcv_pwr_voltage_cb, &robot.gorte);
generic_subscriber_pwr_ctrl_create(&robot.gorte, rcv_pwr_ctrl_cb, &robot.gorte);
}
/****************************************************************/
-/* struct - act_pos */
+/* struct - ref_pos */
/****************************************************************/
-void act_pos_serialize(CDR_Codec *cdrCodec,act_pos *object) {
+void ref_pos_serialize(CDR_Codec *cdrCodec,ref_pos *object) {
CORBA_double_serialize(cdrCodec,&(object->x));
CORBA_double_serialize(cdrCodec,&(object->y));
CORBA_double_serialize(cdrCodec,&(object->phi));
}
void
-act_pos_deserialize(CDR_Codec *cdrCodec,act_pos *object) {
+ref_pos_deserialize(CDR_Codec *cdrCodec,ref_pos *object) {
CORBA_double_deserialize(cdrCodec,&(object->x));
CORBA_double_deserialize(cdrCodec,&(object->y));
CORBA_double_deserialize(cdrCodec,&(object->phi));
}
int
-act_pos_get_max_size(ORTEGetMaxSizeParam *gms) {
+ref_pos_get_max_size(ORTEGetMaxSizeParam *gms) {
CORBA_double_get_max_size(gms);
CORBA_double_get_max_size(gms);
CORBA_double_get_max_size(gms);
}
Boolean
-act_pos_type_register(ORTEDomain *d) {
+ref_pos_type_register(ORTEDomain *d) {
Boolean ret;
ret=ORTETypeRegisterAdd(d,
- "act_pos",
- (ORTETypeSerialize)act_pos_serialize,
- (ORTETypeDeserialize)act_pos_deserialize,
- act_pos_get_max_size,
+ "ref_pos",
+ (ORTETypeSerialize)ref_pos_serialize,
+ (ORTETypeDeserialize)ref_pos_deserialize,
+ ref_pos_get_max_size,
0);
return ret;
}
CORBA_double_serialize(cdrCodec,&(object->x));
CORBA_double_serialize(cdrCodec,&(object->y));
CORBA_double_serialize(cdrCodec,&(object->phi));
- CORBA_double_serialize(cdrCodec,&(object->probability));
}
void
CORBA_double_deserialize(cdrCodec,&(object->x));
CORBA_double_deserialize(cdrCodec,&(object->y));
CORBA_double_deserialize(cdrCodec,&(object->phi));
- CORBA_double_deserialize(cdrCodec,&(object->probability));
}
int
CORBA_double_get_max_size(gms);
CORBA_double_get_max_size(gms);
CORBA_double_get_max_size(gms);
- CORBA_double_get_max_size(gms);
return gms->csize;
}
};
#endif
-#if !defined(_act_pos_defined)
-#define _act_pos_defined 1
-typedef struct act_pos_type act_pos;
-struct act_pos_type {
+#if !defined(_ref_pos_defined)
+#define _ref_pos_defined 1
+typedef struct ref_pos_type ref_pos;
+struct ref_pos_type {
CORBA_double x;
CORBA_double y;
CORBA_double phi;
CORBA_double x;
CORBA_double y;
CORBA_double phi;
-CORBA_double probability;
};
#endif
int motion_status_get_max_size(ORTEGetMaxSizeParam *gms);
Boolean motion_status_type_register(ORTEDomain *d);
-void act_pos_serialize(CDR_Codec *cdrCodec,act_pos *object);
-void act_pos_deserialize(CDR_Codec *cdrCodec,act_pos *object);
-int act_pos_get_max_size(ORTEGetMaxSizeParam *gms);
-Boolean act_pos_type_register(ORTEDomain *d);
+void ref_pos_serialize(CDR_Codec *cdrCodec,ref_pos *object);
+void ref_pos_deserialize(CDR_Codec *cdrCodec,ref_pos *object);
+int ref_pos_get_max_size(ORTEGetMaxSizeParam *gms);
+Boolean ref_pos_type_register(ORTEDomain *d);
void est_pos_serialize(CDR_Codec *cdrCodec,est_pos *object);
void est_pos_deserialize(CDR_Codec *cdrCodec,est_pos *object);
unsigned short err_right;
};
-struct act_pos {
+struct ref_pos {
double x;
double y;
double phi;
double x;
double y;
double phi;
- double probability;
};
struct joy_data {
return 0;
}
-int oled_send_position(uint8_t *buff, int buff_size, struct act_pos_type *pos)
+int oled_send_position(uint8_t *buff, int buff_size, struct est_pos_type *pos)
{
if(buff_size < POSITION_MSG_SIZE)
return -1;
int oled_switch_mode(uint8_t *buff, int buff_size, uint8_t mode, uint8_t status);
int oled_send_voltage(uint8_t *buff, int buff_size, struct pwr_voltage_type *volt);
int oled_set_color(uint8_t *buff, int buff_size, uint8_t color);
-int oled_send_position(uint8_t *buff, int buff_size, struct act_pos_type *pos);
+int oled_send_position(uint8_t *buff, int buff_size, struct est_pos_type *pos);
int oled_send_fsm_state(uint8_t *buff, int buff_size, const char *name, int len);
#ifdef __cplusplus
}
return 0;
}
-int uoled_send_position(struct act_pos_type *pos)
+int uoled_send_position(struct est_pos_type *pos)
{
int ret;
uint8_t msg[POSITION_MSG_SIZE];
int uoled_send_voltage(struct pwr_voltage_type *volt);
int uoled_switch_mode_rep(uint8_t mode, uint8_t status);
int uoled_send_state(const char *name, int len);
-int uoled_send_position(struct act_pos_type *pos);
+int uoled_send_position(struct est_pos_type *pos);
int uoled_set_color(uint8_t color);
#ifdef __cplusplus
}