gusimplewhiteboard
wb_pixel_to_robot_relative_coord.c File Reference
#include "wb_pixel_to_robot_relative_coord.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <limits.h>
Include dependency graph for wb_pixel_to_robot_relative_coord.c:

Go to the source code of this file.

Macros

#define htonll(x)   bswap_64(x)
 
#define ntohll(x)   bswap_64(x)
 
#define htonl(x)   bswap_32(x)
 
#define ntohl(x)   bswap_32(x)
 
#define htons(x)   bswap_16(x)
 
#define ntohs(x)   bswap_16(x)
 

Functions

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_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 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 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)
 
double get_camera_height (enum VisionCamera camera, struct wb_sensors_torsojointsensors *joints, 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)
 Convert to a compressed, serialised, network byte order byte stream. More...
 
size_t wb_pixel_to_robot_relative_coord_from_network_serialised (const char *src, struct wb_pixel_to_robot_relative_coord *dst)
 Convert from a compressed, serialised, network byte order byte stream. More...
 

Macro Definition Documentation

◆ htonl

#define htonl (   x)    bswap_32(x)

Definition at line 97 of file wb_pixel_to_robot_relative_coord.c.

◆ htonll

#define htonll (   x)    bswap_64(x)

Definition at line 93 of file wb_pixel_to_robot_relative_coord.c.

◆ htons

#define htons (   x)    bswap_16(x)

Definition at line 101 of file wb_pixel_to_robot_relative_coord.c.

◆ ntohl

#define ntohl (   x)    bswap_32(x)

Definition at line 98 of file wb_pixel_to_robot_relative_coord.c.

◆ ntohll

#define ntohll (   x)    bswap_64(x)

Definition at line 94 of file wb_pixel_to_robot_relative_coord.c.

◆ ntohs

#define ntohs (   x)    bswap_16(x)

Definition at line 102 of file wb_pixel_to_robot_relative_coord.c.

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 
)

Convert from a compressed, serialised, network byte order byte stream.

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 
)

Convert to a compressed, serialised, network byte order byte stream.

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