예제 #1
0
void BallPercept::draw() const
{
    DECLARE_DEBUG_DRAWING("representation:BallPercept:Image", "drawingOnImage");
    DECLARE_DEBUG_DRAWING("representation:BallPercept:Field", "drawingOnField");
    DECLARE_DEBUG_DRAWING3D("representation:BallPercept", "origin");
    TRANSLATE3D("representation:BallPercept", 0, 0, -230);
    if(ballWasSeen)
    {
        CIRCLE("representation:BallPercept:Image",
               positionInImage.x,
               positionInImage.y,
               radiusInImage,
               1, // pen width
               Drawings::ps_solid,
               ColorClasses::black,
               Drawings::bs_solid,
               ColorRGBA(255, 128, 64, 100));
        CIRCLE("representation:BallPercept:Field",
               relativePositionOnField.x,
               relativePositionOnField.y,
               35,
               0, // pen width
               Drawings::ps_solid,
               ColorClasses::orange,
               Drawings::bs_null,
               ColorClasses::orange);
        // Sorry, no access to field dimensions here, so ball radius is hard coded
        SPHERE3D("representation:BallPercept", relativePositionOnField.x, relativePositionOnField.y, 35, 35, ColorClasses::orange);
    }
}
void RobotModelProvider::update(RobotModel& robotModel)
{
  robotModel.setJointData(theFilteredJointData, theRobotDimensions, theMassCalibration);

  DECLARE_DEBUG_DRAWING3D("module:RobotModelProvider:massOffsets", "robot",
  {
    for(int i = 0; i < MassCalibration::numOfLimbs; ++i)
    {
      const Vector3<>& v(robotModel.limbs[i] * theMassCalibration.masses[i].offset);
      SPHERE3D("module:RobotModelProvider:massOffsets", v.x, v.y, v.z, 3, ColorRGBA(0, 200, 0));
    }
  });
예제 #3
0
void BallPercept::draw() const
{
  DECLARE_DEBUG_DRAWING("representation:BallPercept:image", "drawingOnImage");
  DECLARE_DEBUG_DRAWING("representation:BallPercept:field", "drawingOnField");
  DECLARE_DEBUG_DRAWING3D("representation:BallPercept", "robot");
  TRANSLATE3D("representation:BallPercept", 0, 0, -230);
  if(status == seen)
  {
    CIRCLE("representation:BallPercept:image", positionInImage.x(), positionInImage.y(), radiusInImage, 1, // pen width
           Drawings::solidPen,  ColorRGBA::black, Drawings::solidBrush, ColorRGBA(255, 128, 64, 100));
    CIRCLE("representation:BallPercept:field", positionOnField.x(), positionOnField.y(), radiusOnField, 0, // pen width
           Drawings::solidPen, ColorRGBA::orange, Drawings::noBrush, ColorRGBA::orange);
    SPHERE3D("representation:BallPercept", positionOnField.x(), positionOnField.y(), radiusOnField, radiusOnField, ColorRGBA::orange);
  }
  else if(status == guessed)
    CIRCLE("representation:BallPercept:image", positionInImage.x(), positionInImage.y(), radiusInImage, 1, // pen width
           Drawings::solidPen,  ColorRGBA::black, Drawings::solidBrush, ColorRGBA(64, 128, 255, 90));
}