10 #include "hrpsys/util/GLcamera.h" 11 #include "hrpsys/util/GLlink.h" 12 #include "hrpsys/util/GLbody.h" 13 #include "hrpsys/util/LogManager.h" 14 #include "hrpsys/idl/HRPDataTypes.hh" 22 for (
unsigned int i=0;
i<strlen(str);
i++){
23 glutBitmapCharacter(GLUT_BITMAP_8_BY_13, str[
i]);
28 glColor3d(1.0,1.0,1.0);
32 glColor3d(1.0,0.0,0.0);
36 glColor3d(1.0,1.0,0.0);
40 glColor3d(0.0,1.0,0.0);
44 glColor3d(0.0,0.0,1.0);
48 glColor3d(0.0,0.0,0.0);
53 if (m_log->index()<0)
return;
57 OpenHRP::SceneState &ss = lm->
state();
58 for (
unsigned int i=0;
i<ss.states.length();
i++){
59 OpenHRP::RobotState &rs = ss.states[
i];
62 rs.basePose.position.y,
63 rs.basePose.position.z);
65 rs.basePose.orientation.p,
66 rs.basePose.orientation.y);
73 if (m_log->index()<0)
return;
77 OpenHRP::SceneState &sstate = lm->
state();
81 OpenHRP::RobotState *rstate = NULL;
82 for (
unsigned int i=0;
i<numBodies();
i++){
83 if (
body(
i)->numJoints()){
85 rstate = &sstate.states[
i];
89 #define HEIGHT_STEP 12 90 int width = m_width - 410;
99 glRasterPos2f(x, height);
106 rstate->q[
i]*180/
M_PI);
107 glRasterPos2f(x, height);
114 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
116 glColor4f(0.0,0.0,0.0, 0.5);
120 glRectf(width,0,m_width,m_height);
128 for (
int i=0;
i<4;
i++){
129 for (
int j=0;
j<4;
j++){
130 printf(
"%6.3f ", mat[
j*4+
i]);
void drawString2(const char *str)
void setPosition(double x, double y, double z)
png_infop png_uint_32 * width
void setRotation(const double *R)
png_infop png_uint_32 png_uint_32 * height
def j(str, encoding="cp932")
void printMatrix(double mat[16])
Link * joint(int id) const
void setPosture(const double *i_angles)
std::string sprintf(char const *__restrict fmt,...)
unsigned int numJoints() const
#define SLIDER_AREA_HEIGHT