28 #include <sys/types.h> 33 #endif // HAVE_CONFIG_H 54 resdata[0] = odometry.
x;
55 resdata[1] = odometry.
y;
56 resdata[2] = odometry.
theta;
57 resdata[3] = odometry.
time;
69 resdata[2] = odometry->
time;
80 resdata[2] = odometry->
time;
89 resdata[0] = odometry->
v;
90 resdata[1] = odometry->
w;
91 resdata[2] = odometry->
time;
104 resdata[2] = odometry->
time;
115 resdata[0] = odometry->
wtorque[0];
116 resdata[1] = odometry->
wtorque[1];
117 resdata[2] = odometry->
time;
128 resdata[0] = odometry->
wvel[0];
129 resdata[1] = odometry->
wvel[1];
130 resdata[2] = odometry->
time;
141 resdata[0] = odometry->
wang[0];
142 resdata[1] = odometry->
wang[1];
143 resdata[2] = odometry->
time;
150 double x, y, theta, cx, cy;
158 theta = odometry->
theta;
164 dist = sqrt((cx - x) * (cx - x) + (cy - y) * (cy - y));
183 theta = odometry->
theta;
187 dist = theta - data[0];
193 if (fabs(dist) < data[1])
209 theta = odometry->
theta;
213 dist = (x - data[0]) * cos(data[2]) + (y - data[1]) * sin(data[2]);
void get_force_com(int cs, double *data, double *resdata, SpurUserParamsPtr spur)
int near_ang_com(int cs, double *data, double *resdata, SpurUserParamsPtr spur)
void get_pos_com(int cs, double *data, double *resdata, SpurUserParamsPtr spur)
void cstrans_xy(YPSpur_cs src, YPSpur_cs dest, double *x, double *y, double *theta)
double wvelref[YP_PARAM_MAX_MOTOR_NUM]
void odometry(OdometryPtr xp, short *cnt, short *pwm, double dt, double time)
double wang[YP_PARAM_MAX_MOTOR_NUM]
double wtorque[YP_PARAM_MAX_MOTOR_NUM]
void get_vref_com(int cs, double *data, double *resdata, SpurUserParamsPtr spur)
void cstrans_odometry(YPSpur_cs cs, OdometryPtr dst_odm)
double wvel[YP_PARAM_MAX_MOTOR_NUM]
void get_wheel_torque_com(int cs, double *data, double *resdata, SpurUserParamsPtr spur)
OdometryPtr get_odometry_ptr()
void get_wheel_vref_com(int cs, double *data, double *resdata, SpurUserParamsPtr spur)
int over_line_com(int cs, double *data, double *resdata, SpurUserParamsPtr spur)
int near_pos_com(int cs, double *data, double *resdata, SpurUserParamsPtr spur)
void get_vel_com(int cs, double *data, double *resdata, SpurUserParamsPtr spur)
void get_wheel_vel_com(double *data, double *resdata, SpurUserParamsPtr spur)
void get_wheel_ang_com(double *data, double *resdata, SpurUserParamsPtr spur)