phyepuck.cpp
37 // All measures have been taken on the LARAL e-puck or the official specifications. Lengths are in
81 // The front of the robot is towards -Y (positive speeds of the wheel make the robot move towards -Y)
91 // pack and a short cylinder modelling the upper part (where the electronic board is). We put the
92 // frame of reference of the body (which is equal to that of the whole robot) on the ground to have
93 // move stability and to simplify moving the robot (no need to apply displacements to put it on a
117 // Creating all the wheels. We first create the two motorized wheels and then the two passive ones.
149 PhyJoint* joint = new PhySuspension(m_body->matrix().x_ax, wheel->matrix().w_pos, m_body->matrix().z_ax, m_body, wheel);
171 PhyJoint* joint = new PhySuspension(m_body->matrix().x_ax, wheel->matrix().w_pos, m_body->matrix().z_ax, m_body, wheel);
225 // The min and max speed in rad/s have been derived for the e-puck wheel considering as maximum linear
226 // displacement 14 cm/s (that for the give wheel radius is approximately 1.1 ratations per second)
228 m_wheelsCtrl->setSpeedLimits(-maxAngularSpeed, -maxAngularSpeed, maxAngularSpeed, maxAngularSpeed);
231 connect(m_wheelJoints[0]->dofs()[0], SIGNAL(changedDesiredVelocity(real)), this, SLOT(setRightWheelDesideredVelocity(real)));
232 connect(m_wheelJoints[1]->dofs()[0], SIGNAL(changedDesiredVelocity(real)), this, SLOT(setLeftWheelDesideredVelocity(real)));
243 const double curAngle = sensorsAngles[i] - 90.0; //double(i) * (360.0 / 8.0) + ((360.0 / 8.0) / 2.0);
260 mtr.w_pos = wVector(-batteryplacex / 2.0f, -batteryplacey / 2.0f, batteryplacedistancefromground);
264 mtr.w_pos = wVector(batteryplacex / 2.0f, -batteryplacey / 2.0f, batteryplacedistancefromground);
295 wheeledRobotsComputeKinematicMovement(mtr, m_leftWheelVelocity, m_rightWheelVelocity, wheelr, axletrack, world()->timeStep());
312 // Updating the transformation matrix of the robot. It is coincident with the matrix of the body
316 void PhyEpuck::setProximityIRSensorsGraphicalProperties(bool drawSensor, bool drawRay, bool drawRealRay)
321 void PhyEpuck::setGroundIRSensorsGraphicalProperties(bool drawSensor, bool drawRay, bool drawRealRay)
333 m_frontMarker = new PlanarArrowGraphicalMarker(bodyr, bodyr / 6.0f, bodyr / 4.0f, 0.7f, world());
339 displacement.w_pos = wVector(0.0, 0.0, batteryplacedistancefromground + batteryplacez + bodyh + 0.0001f);