예제 #1
0
void VisionModule::run_()
{
    topThrImage.latch();
    topYImage.latch();
    topUImage.latch();
    topVImage.latch();
    botThrImage.latch();
    botYImage.latch();
    botUImage.latch();
    botVImage.latch();
    joint_angles.latch();
    inertial_state.latch();

    PROF_ENTER(P_VISION);

    vision->notifyImage(topThrImage.message(), topYImage.message(),
                        topUImage.message(), topVImage.message(),
                        botThrImage.message(), botYImage.message(),
                        botUImage.message(), botVImage.message(),
                        joint_angles.message(), inertial_state.message());

    PROF_EXIT(P_VISION);

    updateVisionBall();
    updateVisionRobot();
    updateVisionField();
    updateVisionObstacle();

#ifdef OFFLINE
    portals::Message<messages::ThresholdImage> top, bot;
    top = new messages::ThresholdImage(vision->thresh->betterDebugImage, 320, 240, 320);
    bot = new messages::ThresholdImage(vision->thresh->thresholdedBottom, 320, 240, 320);


    topOutPic.setMessage(top);
    botOutPic.setMessage(bot);

#endif

    /* In order to keep logs synced up, joint angs and inert states are passed
     * thru the vision system. Joint angles are taken at around 100 hz, but
     * images are taken at 30 hz, but by passing joint angles thru vision we
     * get joint angles at 30 hz. */
#ifdef LOG_VISION
    joint_angles_out.setMessage(portals::Message<messages::JointAngles>(
                                &joint_angles.message()));
    inertial_state_out.setMessage(portals::Message<messages::InertialState>(
                                  &inertial_state.message()));
#endif
}
void BH2011ObstacleSymbols::update()
{
	 updateVisionObstacle(); 
}