gusimplewhiteboard
wb_pixel_to_robot_relative_coord.h File Reference
#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>
Include dependency graph for wb_pixel_to_robot_relative_coord.h:
This graph shows which files directly or indirectly include this file:

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_coordwb_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...
 

Macro Definition Documentation

◆ _XOPEN_SOURCE

#define _XOPEN_SOURCE   700

Definition at line 72 of file wb_pixel_to_robot_relative_coord.h.

◆ BOTTOM_CAMERA_ANGLE

#define BOTTOM_CAMERA_ANGLE   (-39.7*M_PI/180)

Definition at line 97 of file wb_pixel_to_robot_relative_coord.h.

◆ BOTTOM_CAMERA_OFFSET_X

#define BOTTOM_CAMERA_OFFSET_X   0.05071

Definition at line 106 of file wb_pixel_to_robot_relative_coord.h.

◆ BOTTOM_CAMERA_OFFSET_Z

#define BOTTOM_CAMERA_OFFSET_Z   0.01774

Definition at line 104 of file wb_pixel_to_robot_relative_coord.h.

◆ CAMERA_HFOV

#define CAMERA_HFOV   (60.97*M_PI/180)

Definition at line 94 of file wb_pixel_to_robot_relative_coord.h.

◆ CAMERA_VFOV

#define CAMERA_VFOV   (47.64*M_PI/180)

Definition at line 95 of file wb_pixel_to_robot_relative_coord.h.

◆ CONV_TO_IMG

#define CONV_TO_IMG (   x,
 
)    (static_cast<uint16_t>((x + INT16_MAX) / ((INT16_MAX * 2) / r)))

Definition at line 114 of file wb_pixel_to_robot_relative_coord.h.

◆ HEAD_BASE_HEIGHT

#define HEAD_BASE_HEIGHT   0.417

Definition at line 101 of file wb_pixel_to_robot_relative_coord.h.

◆ HEAD_BASE_HEIGHT_KNEELING

#define HEAD_BASE_HEIGHT_KNEELING   0.377

Definition at line 102 of file wb_pixel_to_robot_relative_coord.h.

◆ PIXEL_TO_ROBOT_RELATIVE_COORD_C_STRUCT

#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.

◆ PIXEL_TO_ROBOT_RELATIVE_COORD_DESC_BUFFER_SIZE

#define PIXEL_TO_ROBOT_RELATIVE_COORD_DESC_BUFFER_SIZE   14

Definition at line 158 of file wb_pixel_to_robot_relative_coord.h.

◆ PIXEL_TO_ROBOT_RELATIVE_COORD_GENERATED

#define PIXEL_TO_ROBOT_RELATIVE_COORD_GENERATED

Definition at line 153 of file wb_pixel_to_robot_relative_coord.h.

◆ PIXEL_TO_ROBOT_RELATIVE_COORD_NUMBER_OF_VARIABLES

#define PIXEL_TO_ROBOT_RELATIVE_COORD_NUMBER_OF_VARIABLES   1

Definition at line 155 of file wb_pixel_to_robot_relative_coord.h.

◆ PIXEL_TO_ROBOT_RELATIVE_COORD_TO_STRING_BUFFER_SIZE

#define PIXEL_TO_ROBOT_RELATIVE_COORD_TO_STRING_BUFFER_SIZE   12

Definition at line 159 of file wb_pixel_to_robot_relative_coord.h.

◆ TOP_CAMERA_ANGLE

#define TOP_CAMERA_ANGLE   (-1.2*M_PI/180)

Definition at line 98 of file wb_pixel_to_robot_relative_coord.h.

◆ TOP_CAMERA_OFFSET_X

#define TOP_CAMERA_OFFSET_X   0.05871

Definition at line 107 of file wb_pixel_to_robot_relative_coord.h.

◆ TOP_CAMERA_OFFSET_Z

#define TOP_CAMERA_OFFSET_Z   0.06364

Definition at line 105 of file wb_pixel_to_robot_relative_coord.h.

Function Documentation

◆ get_camera_height()

◆ pixel_to_rr_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().

◆ 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 
)

◆ pixel_to_rr_coord_kneeling_conv()

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 
)

◆ pixel_to_rr_coord_legs()

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 
)

◆ pixel_to_rr_coord_legs_no_conv()

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 
)

◆ pixel_to_rr_coord_no_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 
)

◆ rr_to_pixel_coord()

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 
)

◆ wb_pixel_to_robot_relative_coord_description()

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().

◆ wb_pixel_to_robot_relative_coord_from_network_serialised()

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.

◆ wb_pixel_to_robot_relative_coord_from_string()

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 
)

◆ wb_pixel_to_robot_relative_coord_to_network_serialised()

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.

◆ wb_pixel_to_robot_relative_coord_to_string()

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().