gusimplewhiteboard
|
#include <gu_util.h>
#include <stdint.h>
#include "wb_sensors_torsojointsensors.h"
#include "wb_sensors_legjointsensors.h"
#include "wb_vision_control_status.h"
#include <stdlib.h>
Go to the source code of this file.
Classes | |
struct | wb_pixel_to_robot_relative_coord |
WHITEBOARD_POSTER_STRING_CONVERSION. More... | |
Macros | |
#define | _XOPEN_SOURCE 700 |
#define | CAMERA_HFOV (60.97*M_PI/180) |
#define | CAMERA_VFOV (47.64*M_PI/180) |
#define | BOTTOM_CAMERA_ANGLE (-39.7*M_PI/180) |
#define | TOP_CAMERA_ANGLE (-1.2*M_PI/180) |
#define | HEAD_BASE_HEIGHT 0.417 |
#define | HEAD_BASE_HEIGHT_KNEELING 0.377 |
#define | BOTTOM_CAMERA_OFFSET_Z 0.01774 |
#define | TOP_CAMERA_OFFSET_Z 0.06364 |
#define | BOTTOM_CAMERA_OFFSET_X 0.05071 |
#define | TOP_CAMERA_OFFSET_X 0.05871 |
#define | CONV_TO_IMG(x, r) (static_cast<uint16_t>((x + INT16_MAX) / ((INT16_MAX * 2) / r))) |
#define | PIXEL_TO_ROBOT_RELATIVE_COORD_GENERATED |
#define | PIXEL_TO_ROBOT_RELATIVE_COORD_C_STRUCT wb_pixel_to_robot_relative_coord |
#define | PIXEL_TO_ROBOT_RELATIVE_COORD_NUMBER_OF_VARIABLES 1 |
#define | PIXEL_TO_ROBOT_RELATIVE_COORD_DESC_BUFFER_SIZE 14 |
#define | PIXEL_TO_ROBOT_RELATIVE_COORD_TO_STRING_BUFFER_SIZE 12 |
Functions | |
double | get_camera_height (enum VisionCamera camera, struct wb_sensors_torsojointsensors *joints, bool kneeling) |
void | pixel_to_rr_coord (int32_t sx, int32_t sy, enum VisionCamera camera, struct wb_vision_control_status *vs, struct wb_sensors_torsojointsensors *joints, double *distance, double *angle) |
void | pixel_to_rr_coord_legs (int32_t sx, int32_t sy, enum VisionCamera camera, struct wb_vision_control_status *vs, struct wb_sensors_torsojointsensors *joints, struct wb_sensors_legjointsensors *leg_sensors, double *distance, double *angle) |
void | pixel_to_rr_coord_legs_no_conv (int32_t sx, int32_t sy, enum VisionCamera camera, struct wb_vision_control_status *vs, struct wb_sensors_torsojointsensors *joints, struct wb_sensors_legjointsensors *leg_sensors, double *distance, double *angle) |
void | pixel_to_rr_coord_kneeling (int32_t sx, int32_t sy, enum VisionCamera camera, struct wb_vision_control_status *vs, struct wb_sensors_torsojointsensors *joints, double *distance, double *angle, bool kneeling) |
void | pixel_to_rr_coord_kneeling_conv (int32_t sx, int32_t sy, enum VisionCamera camera, struct wb_vision_control_status *vs, struct wb_sensors_torsojointsensors *joints, double *distance, double *angle, bool kneeling, bool conv) |
void | pixel_to_rr_coord_no_conv (int32_t sx, int32_t sy, enum VisionCamera camera, struct wb_vision_control_status *vs, struct wb_sensors_torsojointsensors *joints, double *distance, double *angle) |
void | rr_to_pixel_coord (double angle, double distance, enum VisionCamera camera, struct wb_vision_control_status *vs, struct wb_sensors_torsojointsensors *joints, int32_t *sx, int32_t *sy, bool kneeling) |
const char * | wb_pixel_to_robot_relative_coord_description (const struct wb_pixel_to_robot_relative_coord *self, char *descString, size_t bufferSize) |
Convert to a description string. More... | |
const char * | wb_pixel_to_robot_relative_coord_to_string (const struct wb_pixel_to_robot_relative_coord *self, char *toString, size_t bufferSize) |
Convert to a string. More... | |
struct wb_pixel_to_robot_relative_coord * | wb_pixel_to_robot_relative_coord_from_string (struct wb_pixel_to_robot_relative_coord *self, const char *str) |
Convert from a string. More... | |
size_t | wb_pixel_to_robot_relative_coord_to_network_serialised (const struct wb_pixel_to_robot_relative_coord *self, char *dst) |
WHITEBOARD_POSTER_STRING_CONVERSION. More... | |
size_t | wb_pixel_to_robot_relative_coord_from_network_serialised (const char *src, struct wb_pixel_to_robot_relative_coord *dst) |
Network stream deserialisation. More... | |
#define _XOPEN_SOURCE 700 |
Definition at line 72 of file wb_pixel_to_robot_relative_coord.h.
#define BOTTOM_CAMERA_ANGLE (-39.7*M_PI/180) |
Definition at line 97 of file wb_pixel_to_robot_relative_coord.h.
#define BOTTOM_CAMERA_OFFSET_X 0.05071 |
Definition at line 106 of file wb_pixel_to_robot_relative_coord.h.
#define BOTTOM_CAMERA_OFFSET_Z 0.01774 |
Definition at line 104 of file wb_pixel_to_robot_relative_coord.h.
#define CAMERA_HFOV (60.97*M_PI/180) |
Definition at line 94 of file wb_pixel_to_robot_relative_coord.h.
#define CAMERA_VFOV (47.64*M_PI/180) |
Definition at line 95 of file wb_pixel_to_robot_relative_coord.h.
#define CONV_TO_IMG | ( | x, | |
r | |||
) | (static_cast<uint16_t>((x + INT16_MAX) / ((INT16_MAX * 2) / r))) |
Definition at line 114 of file wb_pixel_to_robot_relative_coord.h.
#define HEAD_BASE_HEIGHT 0.417 |
Definition at line 101 of file wb_pixel_to_robot_relative_coord.h.
#define HEAD_BASE_HEIGHT_KNEELING 0.377 |
Definition at line 102 of file wb_pixel_to_robot_relative_coord.h.
#define PIXEL_TO_ROBOT_RELATIVE_COORD_C_STRUCT wb_pixel_to_robot_relative_coord |
Definition at line 154 of file wb_pixel_to_robot_relative_coord.h.
#define PIXEL_TO_ROBOT_RELATIVE_COORD_DESC_BUFFER_SIZE 14 |
Definition at line 158 of file wb_pixel_to_robot_relative_coord.h.
#define PIXEL_TO_ROBOT_RELATIVE_COORD_GENERATED |
Definition at line 153 of file wb_pixel_to_robot_relative_coord.h.
#define PIXEL_TO_ROBOT_RELATIVE_COORD_NUMBER_OF_VARIABLES 1 |
Definition at line 155 of file wb_pixel_to_robot_relative_coord.h.
#define PIXEL_TO_ROBOT_RELATIVE_COORD_TO_STRING_BUFFER_SIZE 12 |
Definition at line 159 of file wb_pixel_to_robot_relative_coord.h.
#define TOP_CAMERA_ANGLE (-1.2*M_PI/180) |
Definition at line 98 of file wb_pixel_to_robot_relative_coord.h.
#define TOP_CAMERA_OFFSET_X 0.05871 |
Definition at line 107 of file wb_pixel_to_robot_relative_coord.h.
#define TOP_CAMERA_OFFSET_Z 0.06364 |
Definition at line 105 of file wb_pixel_to_robot_relative_coord.h.
double get_camera_height | ( | enum VisionCamera | camera, |
struct wb_sensors_torsojointsensors * | joints, | ||
bool | kneeling | ||
) |
Definition at line 207 of file wb_pixel_to_robot_relative_coord.c.
References BOTTOM_CAMERA_OFFSET_X, BOTTOM_CAMERA_OFFSET_Z, HEAD_BASE_HEIGHT, HEAD_BASE_HEIGHT_KNEELING, wb_sensors_torsojointsensors::HeadPitch, TOP_CAMERA_OFFSET_X, and TOP_CAMERA_OFFSET_Z.
Referenced by pixel_to_rr_coord_kneeling_conv(), and rr_to_pixel_coord().
void pixel_to_rr_coord | ( | int32_t | sx, |
int32_t | sy, | ||
enum VisionCamera | camera, | ||
struct wb_vision_control_status * | vs, | ||
struct wb_sensors_torsojointsensors * | joints, | ||
double * | distance, | ||
double * | angle | ||
) |
Definition at line 127 of file wb_pixel_to_robot_relative_coord.c.
References pixel_to_rr_coord_kneeling().
void pixel_to_rr_coord_kneeling | ( | int32_t | sx, |
int32_t | sy, | ||
enum VisionCamera | camera, | ||
struct wb_vision_control_status * | vs, | ||
struct wb_sensors_torsojointsensors * | joints, | ||
double * | distance, | ||
double * | angle, | ||
bool | kneeling | ||
) |
Definition at line 143 of file wb_pixel_to_robot_relative_coord.c.
References pixel_to_rr_coord_kneeling_conv().
Referenced by pixel_to_rr_coord(), and pixel_to_rr_coord_legs().
void pixel_to_rr_coord_kneeling_conv | ( | int32_t | sx, |
int32_t | sy, | ||
enum VisionCamera | camera, | ||
struct wb_vision_control_status * | vs, | ||
struct wb_sensors_torsojointsensors * | joints, | ||
double * | distance, | ||
double * | angle, | ||
bool | kneeling, | ||
bool | conv | ||
) |
Definition at line 147 of file wb_pixel_to_robot_relative_coord.c.
References BOTTOM_CAMERA_ANGLE, CAMERA_HFOV, CAMERA_VFOV, CONV_TO_IMG, get_camera_height(), wb_sensors_torsojointsensors::HeadPitch, wb_sensors_torsojointsensors::HeadYaw, and TOP_CAMERA_ANGLE.
Referenced by pixel_to_rr_coord_kneeling(), pixel_to_rr_coord_legs_no_conv(), and pixel_to_rr_coord_no_conv().
void pixel_to_rr_coord_legs | ( | int32_t | sx, |
int32_t | sy, | ||
enum VisionCamera | camera, | ||
struct wb_vision_control_status * | vs, | ||
struct wb_sensors_torsojointsensors * | joints, | ||
struct wb_sensors_legjointsensors * | leg_sensors, | ||
double * | distance, | ||
double * | angle | ||
) |
Definition at line 131 of file wb_pixel_to_robot_relative_coord.c.
References wb_sensors_legjointsensors::LKneePitch, pixel_to_rr_coord_kneeling(), and wb_sensors_legjointsensors::RKneePitch.
void pixel_to_rr_coord_legs_no_conv | ( | int32_t | sx, |
int32_t | sy, | ||
enum VisionCamera | camera, | ||
struct wb_vision_control_status * | vs, | ||
struct wb_sensors_torsojointsensors * | joints, | ||
struct wb_sensors_legjointsensors * | leg_sensors, | ||
double * | distance, | ||
double * | angle | ||
) |
Definition at line 135 of file wb_pixel_to_robot_relative_coord.c.
References wb_sensors_legjointsensors::LKneePitch, pixel_to_rr_coord_kneeling_conv(), and wb_sensors_legjointsensors::RKneePitch.
void pixel_to_rr_coord_no_conv | ( | int32_t | sx, |
int32_t | sy, | ||
enum VisionCamera | camera, | ||
struct wb_vision_control_status * | vs, | ||
struct wb_sensors_torsojointsensors * | joints, | ||
double * | distance, | ||
double * | angle | ||
) |
Definition at line 139 of file wb_pixel_to_robot_relative_coord.c.
References pixel_to_rr_coord_kneeling_conv().
void rr_to_pixel_coord | ( | double | angle, |
double | distance, | ||
enum VisionCamera | camera, | ||
struct wb_vision_control_status * | vs, | ||
struct wb_sensors_torsojointsensors * | joints, | ||
int32_t * | sx, | ||
int32_t * | sy, | ||
bool | kneeling | ||
) |
Definition at line 184 of file wb_pixel_to_robot_relative_coord.c.
References BOTTOM_CAMERA_ANGLE, CAMERA_HFOV, CAMERA_VFOV, get_camera_height(), wb_sensors_torsojointsensors::HeadPitch, wb_sensors_torsojointsensors::HeadYaw, and TOP_CAMERA_ANGLE.
const char * wb_pixel_to_robot_relative_coord_description | ( | const struct wb_pixel_to_robot_relative_coord * | self, |
char * | descString, | ||
size_t | bufferSize | ||
) |
Convert to a description string.
Definition at line 225 of file wb_pixel_to_robot_relative_coord.c.
Referenced by guWhiteboard::PixelToRobotRelativeCoord::description().
size_t wb_pixel_to_robot_relative_coord_from_network_serialised | ( | const char * | src, |
struct wb_pixel_to_robot_relative_coord * | dst | ||
) |
Network stream deserialisation.
Network stream deserialisation.
Definition at line 378 of file wb_pixel_to_robot_relative_coord.c.
References wb_pixel_to_robot_relative_coord::i, and ntohl.
struct wb_pixel_to_robot_relative_coord * wb_pixel_to_robot_relative_coord_from_string | ( | struct wb_pixel_to_robot_relative_coord * | self, |
const char * | str | ||
) |
Convert from a string.
Definition at line 257 of file wb_pixel_to_robot_relative_coord.c.
References wb_pixel_to_robot_relative_coord::i, and PIXEL_TO_ROBOT_RELATIVE_COORD_DESC_BUFFER_SIZE.
size_t wb_pixel_to_robot_relative_coord_to_network_serialised | ( | const struct wb_pixel_to_robot_relative_coord * | self, |
char * | dst | ||
) |
WHITEBOARD_POSTER_STRING_CONVERSION.
Network stream serialisation
WHITEBOARD_POSTER_STRING_CONVERSION.
Definition at line 353 of file wb_pixel_to_robot_relative_coord.c.
References htonl.
const char * wb_pixel_to_robot_relative_coord_to_string | ( | const struct wb_pixel_to_robot_relative_coord * | self, |
char * | toString, | ||
size_t | bufferSize | ||
) |
Convert to a string.
Definition at line 241 of file wb_pixel_to_robot_relative_coord.c.
Referenced by guWhiteboard::PixelToRobotRelativeCoord::to_string().