iCub-main
Classes | Macros | Functions | Variables
iCub_Sim.cpp File Reference
#include "iCub_Sim.h"
#include "OdeInit.h"
#include <yarp/os/Log.h>
#include <yarp/os/LogStream.h>
#include <cstdlib>
#include <csignal>
#include <set>
+ Include dependency graph for iCub_Sim.cpp:

Go to the source code of this file.

Classes

struct  contactICubSkinEmul_t
 

Macros

#define CTRL_RAD2DEG   (180.0/M_PI)
 
#define CTRL_DEG2RAD   (M_PI/180.0)
 
#define MAX_DJOINT_FEEDBACKSTRUCTS   500
 

Functions

Semaphore ODE_access (1)
 

Variables

static long gl_frame_length = 1000/30
 
static long ode_step_length = 10
 
static double dstep = 10.0/1000.0
 
static bool glrun
 
static bool simrun
 
static int stop = 0
 
static int v = 0
 
static float xyz [3]
 
static float hpr [8]
 
static float rez [3]
 
static int contactPoint
 
static int mouseDiffx
 
static int mouseDiffy
 
static bool picking = false
 
static float cam_rx = 0.0
 
static float cam_ry = 0.0
 
static int width = 640
 
static int height = 480
 
static int mouse0_down_x
 
static int mouse1_down_x
 
static int mouse0_down_y
 
static int mouse1_down_y
 
static int mouse_ray_x
 
static int mouse_ray_y
 
static float * VAD
 
static float * VAD2
 
const dReal * pos
 
static float angle_xref = 0.0f
 
static float angle_yref = 25.0f
 
static float ydistance = 10.0f
 
static float xdistance = 0.0f
 
static float view_xyz [3]
 
static float view_hpr [3]
 
static float view2_xyz [3]
 
static float view2_hpr [3]
 
static float zoom = 0
 
static float xpos = 0
 
static float ypos = 0
 
static float zpos = 0
 
static float xrot = 0
 
static float yrot = 0
 
static float zrot = 0
 
static float angle =0.0
 
static float lastx
 
static float lasty
 
static float xrotrad = 0
 
static float yrotrad = 0
 
static long startTime
 
static long finishTime
 
static double duration
 
static double frames
 
static double FPS
 
static double seconds
 
static double TimestepManager
 
static float test [3]
 
static Uint32 colorkey
 
static SDL_Surface * image
 
static bool extractImages = false
 
static VideoTexturevideo = NULL
 
static RobotStreamerrobot_streamer = NULL
 
static RobotConfigrobot_config = NULL
 
static bool eyeCams
 
static const GLfloat light_position [] = { 0.0f, 5.0f, 5.0f, 0.0f }
 
static int width_left
 
static int width_right
 
static int height_left
 
static int height_right
 
static double fov_left
 
static double fov_right
 
static int cameraSizeWidth
 
static int cameraSizeHeight
 
static std::map< SkinPart, contactICubSkinEmul_tcontactICubSkinEmulMap
 
static dJointFeedback touchSensorFeedbacks [MAX_DJOINT_FEEDBACKSTRUCTS]
 
static int nFeedbackStructs =0
 
static bool START_SELF_COLLISION_DETECTION = false
 
static const double EXTRA_MARGIN_FOR_TAXEL_POSITION_M = 0.03
 
static const double MORE_EXTRA_MARGIN_FOR_TAXEL_POSITION_M = 0.01
 

Macro Definition Documentation

◆ CTRL_DEG2RAD

#define CTRL_DEG2RAD   (M_PI/180.0)

Definition at line 35 of file iCub_Sim.cpp.

◆ CTRL_RAD2DEG

#define CTRL_RAD2DEG   (180.0/M_PI)

Definition at line 34 of file iCub_Sim.cpp.

◆ MAX_DJOINT_FEEDBACKSTRUCTS

#define MAX_DJOINT_FEEDBACKSTRUCTS   500

Definition at line 118 of file iCub_Sim.cpp.

Function Documentation

◆ ODE_access()

Semaphore ODE_access ( )

Variable Documentation

◆ angle

float angle =0.0
static

Definition at line 77 of file iCub_Sim.cpp.

◆ angle_xref

float angle_xref = 0.0f
static

Definition at line 68 of file iCub_Sim.cpp.

◆ angle_yref

float angle_yref = 25.0f
static

Definition at line 69 of file iCub_Sim.cpp.

◆ cam_rx

float cam_rx = 0.0
static

Definition at line 56 of file iCub_Sim.cpp.

◆ cam_ry

float cam_ry = 0.0
static

Definition at line 56 of file iCub_Sim.cpp.

◆ cameraSizeHeight

int cameraSizeHeight
static

Definition at line 102 of file iCub_Sim.cpp.

◆ cameraSizeWidth

int cameraSizeWidth
static

Definition at line 101 of file iCub_Sim.cpp.

◆ colorkey

Uint32 colorkey
static

Definition at line 84 of file iCub_Sim.cpp.

◆ contactICubSkinEmulMap

std::map<SkinPart,contactICubSkinEmul_t> contactICubSkinEmulMap
static

Definition at line 110 of file iCub_Sim.cpp.

◆ contactPoint

int contactPoint
static

Definition at line 53 of file iCub_Sim.cpp.

◆ dstep

double dstep = 10.0/1000.0
static

Definition at line 41 of file iCub_Sim.cpp.

◆ duration

double duration
static

Definition at line 81 of file iCub_Sim.cpp.

◆ EXTRA_MARGIN_FOR_TAXEL_POSITION_M

const double EXTRA_MARGIN_FOR_TAXEL_POSITION_M = 0.03
static

Definition at line 125 of file iCub_Sim.cpp.

◆ extractImages

bool extractImages = false
static

Definition at line 86 of file iCub_Sim.cpp.

◆ eyeCams

bool eyeCams
static

Definition at line 90 of file iCub_Sim.cpp.

◆ finishTime

long finishTime
static

Definition at line 80 of file iCub_Sim.cpp.

◆ fov_left

double fov_left
static

Definition at line 98 of file iCub_Sim.cpp.

◆ fov_right

double fov_right
static

Definition at line 99 of file iCub_Sim.cpp.

◆ FPS

double FPS
static

Definition at line 81 of file iCub_Sim.cpp.

◆ frames

double frames
static

Definition at line 81 of file iCub_Sim.cpp.

◆ gl_frame_length

long gl_frame_length = 1000/30
static

Definition at line 39 of file iCub_Sim.cpp.

◆ glrun

bool glrun
static

Definition at line 43 of file iCub_Sim.cpp.

◆ height

int height = 480
static

Definition at line 59 of file iCub_Sim.cpp.

◆ height_left

int height_left
static

Definition at line 96 of file iCub_Sim.cpp.

◆ height_right

int height_right
static

Definition at line 97 of file iCub_Sim.cpp.

◆ hpr

float hpr[8]
static

Definition at line 50 of file iCub_Sim.cpp.

◆ image

SDL_Surface* image
static

Definition at line 85 of file iCub_Sim.cpp.

◆ lastx

float lastx
static

Definition at line 78 of file iCub_Sim.cpp.

◆ lasty

float lasty
static

Definition at line 78 of file iCub_Sim.cpp.

◆ light_position

const GLfloat light_position[] = { 0.0f, 5.0f, 5.0f, 0.0f }
static

Definition at line 91 of file iCub_Sim.cpp.

◆ MORE_EXTRA_MARGIN_FOR_TAXEL_POSITION_M

const double MORE_EXTRA_MARGIN_FOR_TAXEL_POSITION_M = 0.01
static

Definition at line 128 of file iCub_Sim.cpp.

◆ mouse0_down_x

int mouse0_down_x
static

Definition at line 61 of file iCub_Sim.cpp.

◆ mouse0_down_y

int mouse0_down_y
static

Definition at line 62 of file iCub_Sim.cpp.

◆ mouse1_down_x

int mouse1_down_x
static

Definition at line 61 of file iCub_Sim.cpp.

◆ mouse1_down_y

int mouse1_down_y
static

Definition at line 62 of file iCub_Sim.cpp.

◆ mouse_ray_x

int mouse_ray_x
static

Definition at line 63 of file iCub_Sim.cpp.

◆ mouse_ray_y

int mouse_ray_y
static

Definition at line 64 of file iCub_Sim.cpp.

◆ mouseDiffx

int mouseDiffx
static

Definition at line 54 of file iCub_Sim.cpp.

◆ mouseDiffy

int mouseDiffy
static

Definition at line 54 of file iCub_Sim.cpp.

◆ nFeedbackStructs

int nFeedbackStructs =0
static

Definition at line 121 of file iCub_Sim.cpp.

◆ ode_step_length

long ode_step_length = 10
static

Definition at line 40 of file iCub_Sim.cpp.

◆ picking

bool picking = false
static

Definition at line 55 of file iCub_Sim.cpp.

◆ pos

const dReal* pos

Definition at line 67 of file iCub_Sim.cpp.

◆ rez

float rez[3]
static

Definition at line 51 of file iCub_Sim.cpp.

◆ robot_config

RobotConfig* robot_config = NULL
static

Definition at line 89 of file iCub_Sim.cpp.

◆ robot_streamer

RobotStreamer* robot_streamer = NULL
static

Definition at line 88 of file iCub_Sim.cpp.

◆ seconds

double seconds
static

Definition at line 81 of file iCub_Sim.cpp.

◆ simrun

bool simrun
static

Definition at line 44 of file iCub_Sim.cpp.

◆ START_SELF_COLLISION_DETECTION

bool START_SELF_COLLISION_DETECTION = false
static

Definition at line 123 of file iCub_Sim.cpp.

◆ startTime

long startTime
static

Definition at line 80 of file iCub_Sim.cpp.

◆ stop

int stop = 0
static

Definition at line 46 of file iCub_Sim.cpp.

◆ test

float test[3]
static

Definition at line 82 of file iCub_Sim.cpp.

◆ TimestepManager

double TimestepManager
static

Definition at line 81 of file iCub_Sim.cpp.

◆ touchSensorFeedbacks

dJointFeedback touchSensorFeedbacks[MAX_DJOINT_FEEDBACKSTRUCTS]
static

Definition at line 120 of file iCub_Sim.cpp.

◆ v

int v = 0
static

Definition at line 47 of file iCub_Sim.cpp.

◆ VAD

float* VAD
static

Definition at line 65 of file iCub_Sim.cpp.

◆ VAD2

float* VAD2
static

Definition at line 66 of file iCub_Sim.cpp.

◆ video

VideoTexture* video = NULL
static

Definition at line 87 of file iCub_Sim.cpp.

◆ view2_hpr

float view2_hpr[3]
static

Definition at line 75 of file iCub_Sim.cpp.

◆ view2_xyz

float view2_xyz[3]
static

Definition at line 74 of file iCub_Sim.cpp.

◆ view_hpr

float view_hpr[3]
static

Definition at line 73 of file iCub_Sim.cpp.

◆ view_xyz

float view_xyz[3]
static

Definition at line 72 of file iCub_Sim.cpp.

◆ width

int width = 640
static

Definition at line 58 of file iCub_Sim.cpp.

◆ width_left

int width_left
static

Definition at line 94 of file iCub_Sim.cpp.

◆ width_right

int width_right
static

Definition at line 95 of file iCub_Sim.cpp.

◆ xdistance

float xdistance = 0.0f
static

Definition at line 71 of file iCub_Sim.cpp.

◆ xpos

float xpos = 0
static

Definition at line 77 of file iCub_Sim.cpp.

◆ xrot

float xrot = 0
static

Definition at line 77 of file iCub_Sim.cpp.

◆ xrotrad

float xrotrad = 0
static

Definition at line 79 of file iCub_Sim.cpp.

◆ xyz

float xyz[3]
static

Definition at line 49 of file iCub_Sim.cpp.

◆ ydistance

float ydistance = 10.0f
static

Definition at line 70 of file iCub_Sim.cpp.

◆ ypos

float ypos = 0
static

Definition at line 77 of file iCub_Sim.cpp.

◆ yrot

float yrot = 0
static

Definition at line 77 of file iCub_Sim.cpp.

◆ yrotrad

float yrotrad = 0
static

Definition at line 79 of file iCub_Sim.cpp.

◆ zoom

float zoom = 0
static

Definition at line 76 of file iCub_Sim.cpp.

◆ zpos

float zpos = 0
static

Definition at line 77 of file iCub_Sim.cpp.

◆ zrot

float zrot = 0
static

Definition at line 77 of file iCub_Sim.cpp.