10 #include "hrpsys/util/GLcamera.h" 11 #include "hrpsys/util/GLlink.h" 12 #include "hrpsys/util/GLbody.h" 13 #include "hrpsys/util/LogManager.h" 16 #include "hrpsys/idl/CollisionDetectorService.hh" 25 for (
unsigned int i=0;
i<strlen(str);
i++){
26 glutBitmapCharacter(GLUT_BITMAP_9_BY_15, str[
i]);
32 if (m_log->index()<0)
return;
34 #ifdef USE_COLLISION_STATE 38 OpenHRP::CollisionDetectorService::CollisionState &co = lm->
state();
39 if (co.angle.length() == glbody->
numJoints()){
65 if (m_log->index()<0)
return;
67 #ifdef USE_COLLISION_STATE 70 OpenHRP::CollisionDetectorService::CollisionState &co = lm->
state();
74 for (
unsigned int i=0;
i<co.lines.length();
i++){
75 GLdouble p0[3], p1[3];
76 p0[0] = co.lines[
i][0][0];
77 p0[1] = co.lines[
i][0][1];
78 p0[2] = co.lines[
i][0][2];
79 p1[0] = co.lines[
i][1][0];
80 p1[1] = co.lines[
i][1][1];
81 p1[2] = co.lines[
i][1][2];
90 for (
unsigned int i=0;
i<co.lines.length();
i++){
91 GLdouble p0[3], p1[3];
92 p0[0] = co.lines[
i][0][0];
93 p0[1] = co.lines[
i][0][1];
94 p0[2] = co.lines[
i][0][2];
95 p1[0] = co.lines[
i][1][0];
96 p1[1] = co.lines[
i][1][1];
97 p1[2] = co.lines[
i][1][2];
109 for (
unsigned int i=0;
i<tp.
lines.size();
i++){
110 const std::pair<hrp::Vector3, hrp::Vector3>& line = tp.
lines[
i];
111 glVertex3dv(line.first.data());
112 glVertex3dv(line.second.data());
119 for (
unsigned int i=0;
i<tp.
lines.size();
i++){
120 const std::pair<hrp::Vector3, hrp::Vector3>& line = tp.
lines[
i];
121 glVertex3dv(line.first.data());
122 glVertex3dv(line.second.data());
133 int width = m_width - 220;
134 #define HEIGHT_STEP 12 144 glRasterPos2f(x, height);
150 if (m_log->index()<0)
return;
154 OpenHRP::CollisionDetectorService::CollisionState &co = lm->
state();
159 sprintf(buf,
"Number of pair %8d", co.lines.length());
160 glRasterPos2f(x, height);
164 sprintf(buf,
"Calc Time [msec] %8.3f", co.computation_time);
165 glRasterPos2f(x, height);
169 sprintf(buf,
"Recover Time[msec] %8.3f", co.recover_time);
170 glRasterPos2f(x, height);
174 sprintf(buf,
"Safe Posture %8s", co.safe_posture?
"true":
"false");
175 glRasterPos2f(x, height);
179 sprintf(buf,
"Loop for check %8d", co.loop_for_check);
180 glRasterPos2f(x, height);
unsigned int numJoints() const
unsigned int numLinks() const
void drawAdditionalLines()
ColdetModelPtr coldetModel
Link * link(int index) const
png_infop png_uint_32 * width
static void drawString(const char *str)
png_infop png_uint_32 png_uint_32 * height
std::string sprintf(char const *__restrict fmt,...)
std::vector< std::pair< hrp::Vector3, hrp::Vector3 > > lines
Link * joint(int id) const
std::vector< double > posture