79 skills found · Page 1 of 3
chrisneagu / FTC Skystone Dark Angels Romania 2020NOTICE This repository contains the public FTC SDK for the SKYSTONE (2019-2020) competition season. If you are looking for the current season's FTC SDK software, please visit the new and permanent home of the public FTC SDK: FtcRobotController repository Welcome! This GitHub repository contains the source code that is used to build an Android app to control a FIRST Tech Challenge competition robot. To use this SDK, download/clone the entire project to your local computer. Getting Started If you are new to robotics or new to the FIRST Tech Challenge, then you should consider reviewing the FTC Blocks Tutorial to get familiar with how to use the control system: FTC Blocks Online Tutorial Even if you are an advanced Java programmer, it is helpful to start with the FTC Blocks tutorial, and then migrate to the OnBot Java Tool or to Android Studio afterwards. Downloading the Project If you are an Android Studio programmer, there are several ways to download this repo. Note that if you use the Blocks or OnBot Java Tool to program your robot, then you do not need to download this repository. If you are a git user, you can clone the most current version of the repository: git clone https://github.com/FIRST-Tech-Challenge/SKYSTONE.git Or, if you prefer, you can use the "Download Zip" button available through the main repository page. Downloading the project as a .ZIP file will keep the size of the download manageable. You can also download the project folder (as a .zip or .tar.gz archive file) from the Downloads subsection of the Releases page for this repository. Once you have downloaded and uncompressed (if needed) your folder, you can use Android Studio to import the folder ("Import project (Eclipse ADT, Gradle, etc.)"). Getting Help User Documentation and Tutorials FIRST maintains online documentation with information and tutorials on how to use the FIRST Tech Challenge software and robot control system. You can access this documentation using the following link: SKYSTONE Online Documentation Note that the online documentation is an "evergreen" document that is constantly being updated and edited. It contains the most current information about the FIRST Tech Challenge software and control system. Javadoc Reference Material The Javadoc reference documentation for the FTC SDK is now available online. Click on the following link to view the FTC SDK Javadoc documentation as a live website: FTC Javadoc Documentation Documentation for the FTC SDK is also included with this repository. There is a subfolder called "doc" which contains several subfolders: The folder "apk" contains the .apk files for the FTC Driver Station and FTC Robot Controller apps. The folder "javadoc" contains the JavaDoc user documentation for the FTC SDK. Online User Forum For technical questions regarding the Control System or the FTC SDK, please visit the FTC Technology forum: FTC Technology Forum Release Information Version 5.5 (20200824-090813) Version 5.5 requires Android Studio 4.0 or later. New features Adds support for calling custom Java classes from Blocks OpModes (fixes SkyStone issue #161). Classes must be in the org.firstinspires.ftc.teamcode package. Methods must be public static and have no more than 21 parameters. Parameters declared as OpMode, LinearOpMode, Telemetry, and HardwareMap are supported and the argument is provided automatically, regardless of the order of the parameters. On the block, the sockets for those parameters are automatically filled in. Parameters declared as char or java.lang.Character will accept any block that returns text and will only use the first character in the text. Parameters declared as boolean or java.lang.Boolean will accept any block that returns boolean. Parameters declared as byte, java.lang.Byte, short, java.lang.Short, int, java.lang.Integer, long, or java.lang.Long, will accept any block that returns a number and will round that value to the nearest whole number. Parameters declared as float, java.lang.Float, double, java.lang.Double will accept any block that returns a number. Adds telemetry API method for setting display format Classic Monospace HTML (certain tags only) Adds blocks support for switching cameras. Adds Blocks support for TensorFlow Object Detection with a custom model. Adds support for uploading a custom TensorFlow Object Detection model in the Manage page, which is especially useful for Blocks and OnBotJava users. Shows new Control Hub blink codes when the WiFi band is switched using the Control Hub's button (only possible on Control Hub OS 1.1.2) Adds new warnings which can be disabled in the Advanced RC Settings Mismatched app versions warning Unnecessary 2.4 GHz WiFi usage warning REV Hub is running outdated firmware (older than version 1.8.2) Adds support for Sony PS4 gamepad, and reworks how gamepads work on the Driver Station Removes preference which sets gamepad type based on driver position. Replaced with menu which allows specifying type for gamepads with unknown VID and PID Attempts to auto-detect gamepad type based on USB VID and PID If gamepad VID and PID is not known, use type specified by user for that VID and PID If gamepad VID and PID is not known AND the user has not specified a type for that VID and PID, an educated guess is made about how to map the gamepad Driver Station will now attempt to automatically recover from a gamepad disconnecting, and re-assign it to the position it was assigned to when it dropped If only one gamepad is assigned and it drops: it can be recovered If two gamepads are assigned, and have different VID/PID signatures, and only one drops: it will be recovered If two gamepads are assigned, and have different VID/PID signatures, and BOTH drop: both will be recovered If two gamepads are assigned, and have the same VID/PID signatures, and only one drops: it will be recovered If two gamepads are assigned, and have the same VID/PID signatures, and BOTH drop: neither will be recovered, because of the ambiguity of the gamepads when they re-appear on the USB bus. There is currently one known edge case: if there are two gamepads with the same VID/PID signature plugged in, but only one is assigned, and they BOTH drop, it's a 50-50 chance of which one will be chosen for automatic recovery to the assigned position: it is determined by whichever one is re-enumerated first by the USB bus controller. Adds landscape user interface to Driver Station New feature: practice timer with audio cues New feature (Control Hub only): wireless network connection strength indicator (0-5 bars) New feature (Control Hub only): tapping on the ping/channel display will switch to an alternate display showing radio RX dBm and link speed (tap again to switch back) The layout will NOT autorotate. You can switch the layout from the Driver Station's settings menu. Breaking changes Removes support for Android versions 4.4 through 5.1 (KitKat and Lollipop). The minSdkVersion is now 23. Removes the deprecated LinearOpMode methods waitOneFullHardwareCycle() and waitForNextHardwareCycle() Enhancements Handles RS485 address of Control Hub automatically The Control Hub is automatically given a reserved address Existing configuration files will continue to work All addresses in the range of 1-10 are still available for Expansion Hubs The Control Hub light will now normally be solid green, without blinking to indicate the address The Control Hub will not be shown on the Expansion Hub Address Change settings page Improves REV Hub firmware updater The user can now choose between all available firmware update files Version 1.8.2 of the REV Hub firmware is bundled into the Robot Controller app. Text was added to clarify that Expansion Hubs can only be updated via USB. Firmware update speed was reduced to improve reliability Allows REV Hub firmware to be updated directly from the Manage webpage Improves log viewer on Robot Controller Horizontal scrolling support (no longer word wrapped) Supports pinch-to-zoom Uses a monospaced font Error messages are highlighted New color scheme Attempts to force-stop a runaway/stuck OpMode without restarting the entire app Not all types of runaway conditions are stoppable, but if the user code attempts to talk to hardware during the runaway, the system should be able to capture it. Makes various tweaks to the Self Inspect screen Renames "OS version" entry to "Android version" Renames "WiFi Direct Name" to "WiFi Name" Adds Control Hub OS version, when viewing the report of a Control Hub Hides the airplane mode entry, when viewing the report of a Control Hub Removes check for ZTE Speed Channel Changer Shows firmware version for all Expansion and Control Hubs Reworks network settings portion of Manage page All network settings are now applied with a single click The WiFi Direct channel of phone-based Robot Controllers can now be changed from the Manage page WiFi channels are filtered by band (2.4 vs 5 GHz) and whether they overlap with other channels The current WiFi channel is pre-selected on phone-based Robot Controllers, and Control Hubs running OS 1.1.2 or later. On Control Hubs running OS 1.1.2 or later, you can choose to have the system automatically select a channel on the 5 GHz band Improves OnBotJava New light and dark themes replace the old themes (chaos, github, chrome,...) the new default theme is light and will be used when you first update to this version OnBotJava now has a tabbed editor Read-only offline mode Improves function of "exit" menu item on Robot Controller and Driver Station Now guaranteed to be fully stopped and unloaded from memory Shows a warning message if a LinearOpMode exists prematurely due to failure to monitor for the start condition Improves error message shown when the Driver Station and Robot Controller are incompatible with each other Driver Station OpMode Control Panel now disabled while a Restart Robot is in progress Disables advanced settings related to WiFi direct when the Robot Controller is a Control Hub. Tint phone battery icons on Driver Station when low/critical. Uses names "Control Hub Portal" and "Control Hub" (when appropriate) in new configuration files Improve I2C read performance Very large improvement on Control Hub; up to ~2x faster with small (e.g. 6 byte) reads Not as apparent on Expansion Hubs connected to a phone Update/refresh build infrastructure Update to 'androidx' support library from 'com.android.support:appcompat', which is end-of-life Update targetSdkVersion and compileSdkVersion to 28 Update Android Studio's Android plugin to latest Fix reported build timestamp in 'About' screen Add sample illustrating manual webcam use: ConceptWebcam Bug fixes Fixes SkyStone issue #248 Fixes SkyStone issue #232 and modifies bulk caching semantics to allow for cache-preserving MANUAL/AUTO transitions. Improves performance when REV 2M distance sensor is unplugged Improves readability of Toast messages on certain devices Allows a Driver Station to connect to a Robot Controller after another has disconnected Improves generation of fake serial numbers for UVC cameras which do not provide a real serial number Previously some devices would assign such cameras a serial of 0:0 and fail to open and start streaming Fixes ftc_app issue #638. Fixes a slew of bugs with the Vuforia camera monitor including: Fixes bug where preview could be displayed with a wonky aspect ratio Fixes bug where preview could be cut off in landscape Fixes bug where preview got totally messed up when rotating phone Fixes bug where crosshair could drift off target when using webcams Fixes issue in UVC driver on some devices (ftc_app 681) if streaming was started/stopped multiple times in a row Issue manifested as kernel panic on devices which do not have this kernel patch. On affected devices which do have the patch, the issue was manifest as simply a failure to start streaming. The Tech Team believes that the root cause of the issue is a bug in the Linux kernel XHCI driver. A workaround was implemented in the SDK UVC driver. Fixes bug in UVC driver where often half the frames from the camera would be dropped (e.g. only 15FPS delivered during a streaming session configured for 30FPS). Fixes issue where TensorFlow Object Detection would show results whose confidence was lower than the minimum confidence parameter. Fixes a potential exploitation issue of CVE-2019-11358 in OnBotJava Fixes changing the address of an Expansion Hub with additional Expansion Hubs connected to it Preserves the Control Hub's network connection when "Restart Robot" is selected Fixes issue where device scans would fail while the Robot was restarting Fix RenderScript usage Use androidx.renderscript variant: increased compatibility Use RenderScript in Java mode, not native: simplifies build Fixes webcam-frame-to-bitmap conversion problem: alpha channel wasn't being initialized, only R, G, & B Fixes possible arithmetic overflow in Deadline Fixes deadlock in Vuforia webcam support which could cause 5-second delays when stopping OpMode Version 5.4 (20200108-101156) Fixes SkyStone issue #88 Adds an inspection item that notes when a robot controller (Control Hub) is using the factory default password. Fixes SkyStone issue #61 Fixes SkyStone issue #142 Fixes ftc_app issue #417 by adding more current and voltage monitoring capabilities for REV Hubs. Fixes a crash sometimes caused by OnBotJava activity Improves OnBotJava autosave functionality ftc_app #738 Fixes system responsiveness issue when an Expansion Hub is disconnected Fixes issue where IMU initialization could prevent Op Modes from stopping Fixes issue where AndroidTextToSpeech.speak() would fail if it was called too early Adds telemetry.speak() methods and blocks, which cause the Driver Station (if also updated) to speak text Adds and improves Expansion Hub-related warnings Improves Expansion Hub low battery warning Displays the warning immediately after the hub reports it Specifies whether the condition is current or occurred temporarily during an OpMode run Displays which hubs reported low battery Displays warning when hub loses and regains power during an OpMode run Fixes the hub's LED pattern after this condition Displays warning when Expansion Hub is not responding to commands Specifies whether the condition is current or occurred temporarily during an OpMode run Clarifies warning when Expansion Hub is not present at startup Specifies that this condition requires a Robot Restart before the hub can be used. The hub light will now accurately reflect this state Improves logging and reduces log spam during these conditions Syncs the Control Hub time and timezone to a connected web browser programming the robot, if a Driver Station is not available. Adds bulk read functionality for REV Hubs A bulk caching mode must be set at the Hub level with LynxModule#setBulkCachingMode(). This applies to all relevant SDK hardware classes that reference that Hub. The following following Hub bulk caching modes are available: BulkCachingMode.OFF (default): All hardware calls operate as usual. Bulk data can read through LynxModule#getBulkData() and processed manually. BulkCachingMode.AUTO: Applicable hardware calls are served from a bulk read cache that is cleared/refreshed automatically to ensure identical commands don't hit the same cache. The cache can also be cleared manually with LynxModule#clearBulkCache(), although this is not recommended. (advanced users) BulkCachingMode.MANUAL: Same as BulkCachingMode.AUTO except the cache is never cleared automatically. To avoid getting stale data, the cache must be manually cleared at the beginning of each loop body or as the user deems appropriate. Removes PIDF Annotation values added in Rev 5.3 (to AndyMark, goBILDA and TETRIX motor configurations). The new motor types will still be available but their Default control behavior will revert back to Rev 5.2 Adds new ConceptMotorBulkRead sample Opmode to demonstrate and compare Motor Bulk-Read modes for reducing I/O latencies. Version 5.3 (20191004-112306) Fixes external USB/UVC webcam support Makes various bugfixes and improvements to Blocks page, including but not limited to: Many visual tweaks Browser zoom and window resize behave better Resizing the Java preview pane works better and more consistently across browsers The Java preview pane consistently gets scrollbars when needed The Java preview pane is hidden by default on phones Internet Explorer 11 should work Large dropdown lists display properly on lower res screens Disabled buttons are now visually identifiable as disabled A warning is shown if a user selects a TFOD sample, but their device is not compatible Warning messages in a Blocks op mode are now visible by default. Adds goBILDA 5201 and 5202 motors to Robot Configurator Adds PIDF Annotation values to AndyMark, goBILDA and TETRIX motor configurations. This has the effect of causing the RUN_USING_ENCODERS and RUN_TO_POSITION modes to use PIDF vs PID closed loop control on these motors. This should provide more responsive, yet stable, speed control. PIDF adds Feedforward control to the basic PID control loop. Feedforward is useful when controlling a motor's speed because it "anticipates" how much the control voltage must change to achieve a new speed set-point, rather than requiring the integrated error to change sufficiently. The PIDF values were chosen to provide responsive, yet stable, speed control on a lightly loaded motor. The more heavily a motor is loaded (drag or friction), the more noticable the PIDF improvement will be. Fixes startup crash on Android 10 Fixes ftc_app issue #712 (thanks to FROGbots-4634) Fixes ftc_app issue #542 Allows "A" and lowercase letters when naming device through RC and DS apps. Version 5.2 (20190905-083277) Fixes extra-wide margins on settings activities, and placement of the new configuration button Adds Skystone Vuforia image target data. Includes sample Skystone Vuforia Navigation op modes (Java). Includes sample Skystone Vuforia Navigation op modes (Blocks). Adds TensorFlow inference model (.tflite) for Skystone game elements. Includes sample Skystone TensorFlow op modes (Java). Includes sample Skystone TensorFlow op modes (Blocks). Removes older (season-specific) sample op modes. Includes 64-bit support (to comply with Google Play requirements). Protects against Stuck OpModes when a Restart Robot is requested. (Thanks to FROGbots-4634) (ftc_app issue #709) Blocks related changes: Fixes bug with blocks generated code when hardware device name is a java or javascript reserved word. Shows generated java code for blocks, even when hardware items are missing from the active configuration. Displays warning icon when outdated Vuforia and TensorFlow blocks are used (SkyStone issue #27) Version 5.1 (20190820-222104) Defines default PIDF parameters for the following motors: REV Core Hex Motor REV 20:1 HD Hex Motor REV 40:1 HD Hex Motor Adds back button when running on a device without a system back button (such as a Control Hub) Allows a REV Control Hub to update the firmware on a REV Expansion Hub via USB Fixes SkyStone issue #9 Fixes ftc_app issue #715 Prevents extra DS User clicks by filtering based on current state. Prevents incorrect DS UI state changes when receiving new OpMode list from RC Adds support for REV Color Sensor V3 Adds a manual-refresh DS Camera Stream for remotely viewing RC camera frames. To show the stream on the DS, initialize but do not run a stream-enabled opmode, select the Camera Stream option in the DS menu, and tap the image to refresh. This feature is automatically enabled when using Vuforia or TFOD—no additional RC configuration is required for typical use cases. To hide the stream, select the same menu item again. Note that gamepads are disabled and the selected opmode cannot be started while the stream is open as a safety precaution. To use custom streams, consult the API docs for CameraStreamServer#setSource and CameraStreamSource. Adds many Star Wars sounds to RobotController resources. Added SKYSTONE Sounds Chooser Sample Program. Switches out startup, connect chimes, and error/warning sounds for Star Wars sounds Updates OnBot Java to use a WebSocket for communication with the robot The OnBot Java page no longer has to do a full refresh when a user switches from editing one file to another Known issues: Camera Stream The Vuforia camera stream inherits the issues present in the phone preview (namely ftc_app issue #574). This problem does not affect the TFOD camera stream even though it receives frames from Vuforia. The orientation of the stream frames may not always match the phone preview. For now, these frames may be rotated manually via a custom CameraStreamSource if desired. OnBotJava Browser back button may not always work correctly It's possible for a build to be queued, but not started. The OnBot Java build console will display a warning if this occurs. A user might not realize they are editing a different file if the user inadvertently switches from one file to another since this switch is now seamless. The name of the currently open file is displayed in the browser tab. Version 5.0 (built on 19.06.14) Support for the REV Robotics Control Hub. Adds a Java preview pane to the Blocks editor. Adds a new offline export feature to the Blocks editor. Display wifi channel in Network circle on Driver Station. Adds calibration for Logitech C270 Updates build tooling and target SDK. Compliance with Google's permissions infrastructure (Required after build tooling update). Keep Alives to mitigate the Motorola wifi scanning problem. Telemetry substitute no longer necessary. Improves Vuforia error reporting. Fixes ftctechnh/ftc_app issues 621, 713. Miscellaneous bug fixes and improvements. Version 4.3 (built on 18.10.31) Includes missing TensorFlow-related libraries and files. Version 4.2 (built on 18.10.30) Includes fix to avoid deadlock situation with WatchdogMonitor which could result in USB communication errors. Comm error appeared to require that user disconnect USB cable and restart the Robot Controller app to recover. robotControllerLog.txt would have error messages that included the words "E RobotCore: lynx xmit lock: #### abandoning lock:" Includes fix to correctly list the parent module address for a REV Robotics Expansion Hub in a configuration (.xml) file. Bug in versions 4.0 and 4.1 would incorrect list the address module for a parent REV Robotics device as "1". If the parent module had a higher address value than the daisy-chained module, then this bug would prevent the Robot Controller from communicating with the downstream Expansion Hub. Added requirement for ACCESS_COARSE_LOCATION to allow a Driver Station running Android Oreo to scan for Wi-Fi Direct devices. Added google() repo to build.gradle because aapt2 must be downloaded from the google() repository beginning with version 3.2 of the Android Gradle Plugin. Important Note: Android Studio users will need to be connected to the Internet the first time build the ftc_app project. Internet connectivity is required for the first build so the appropriate files can be downloaded from the Google repository. Users should not need to be connected to the Internet for subsequent builds. This should also fix buid issue where Android Studio would complain that it "Could not find com.android.tools.lint:lint-gradle:26.1.4" (or similar). Added support for REV Spark Mini motor controller as part of the configuration menu for a servo/PWM port on the REV Expansion Hub. Provide examples for playing audio files in an Op Mode. Block Development Tool Changes Includes a fix for a problem with the Velocity blocks that were reported in the FTC Technology forum (Blocks Programming subforum). Change the "Save completed successfully." message to a white color so it will contrast with a green background. Fixed the "Download image" feature so it will work if there are text blocks in the op mode. Introduce support for Google's TensorFlow Lite technology for object detetion for 2018-2019 game. TensorFlow lite can recognize Gold Mineral and Silver Mineral from 2018-2019 game. Example Java and Block op modes are included to show how to determine the relative position of the gold block (left, center, right). Version 4.1 (released on 18.09.24) Changes include: Fix to prevent crash when deprecated configuration annotations are used. Change to allow FTC Robot Controller APK to be auto-updated using FIRST Global Control Hub update scripts. Removed samples for non supported / non legal hardware. Improvements to Telemetry.addData block with "text" socket. Updated Blocks sample op mode list to include Rover Ruckus Vuforia example. Update SDK library version number. Version 4.0 (released on 18.09.12) Changes include: Initial support for UVC compatible cameras If UVC camera has a unique serial number, RC will detect and enumerate by serial number. If UVC camera lacks a unique serial number, RC will only support one camera of that type connected. Calibration settings for a few cameras are included (see TeamCode/src/main/res/xml/teamwebcamcalibrations.xml for details). User can upload calibration files from Program and Manage web interface. UVC cameras seem to draw a fair amount of electrical current from the USB bus. This does not appear to present any problems for the REV Robotics Control Hub. This does seem to create stability problems when using some cameras with an Android phone-based Robot Controller. FTC Tech Team is investigating options to mitigate this issue with the phone-based Robot Controllers. Updated sample Vuforia Navigation and VuMark Op Modes to demonstrate how to use an internal phone-based camera and an external UVC webcam. Support for improved motor control. REV Robotics Expansion Hub firmware 1.8 and greater will support a feed forward mechanism for closed loop motor control. FTC SDK has been modified to support PIDF coefficients (proportional, integral, derivative, and feed forward). FTC Blocks development tool modified to include PIDF programming blocks. Deprecated older PID-related methods and variables. REV's 1.8.x PIDF-related changes provide a more linear and accurate way to control a motor. Wireless Added 5GHz support for wireless channel changing for those devices that support it. Tested with Moto G5 and E4 phones. Also tested with other (currently non-approved) phones such as Samsung Galaxy S8. Improved Expansion Hub firmware update support in Robot Controller app Changes to make the system more robust during the firmware update process (when performed through Robot Controller app). User no longer has to disconnect a downstream daisy-chained Expansion Hub when updating an Expansion Hub's firmware. If user is updating an Expansion Hub's firmware through a USB connection, he/she does not have to disconnect RS485 connection to other Expansion Hubs. The user still must use a USB connection to update an Expansion Hub's firmware. The user cannot update the Expansion Hub firmware for a downstream device that is daisy chained through an RS485 connection. If an Expansion Hub accidentally gets "bricked" the Robot Controller app is now more likely to recognize the Hub when it scans the USB bus. Robot Controller app should be able to detect an Expansion Hub, even if it accidentally was bricked in a previous update attempt. Robot Controller app should be able to install the firmware onto the Hub, even if if accidentally was bricked in a previous update attempt. Resiliency FTC software can detect and enable an FTDI reset feature that is available with REV Robotics v1.8 Expansion Hub firmware and greater. When enabled, the Expansion Hub can detect if it hasn't communicated with the Robot Controller over the FTDI (USB) connection. If the Hub hasn't heard from the Robot Controller in a while, it will reset the FTDI connection. This action helps system recover from some ESD-induced disruptions. Various fixes to improve reliability of FTC software. Blocks Fixed errors with string and list indices in blocks export to java. Support for USB connected UVC webcams. Refactored optimized Blocks Vuforia code to support Rover Ruckus image targets. Added programming blocks to support PIDF (proportional, integral, derivative and feed forward) motor control. Added formatting options (under Telemetry and Miscellaneous categories) so user can set how many decimal places to display a numerical value. Support to play audio files (which are uploaded through Blocks web interface) on Driver Station in addition to the Robot Controller. Fixed bug with Download Image of Blocks feature. Support for REV Robotics Blinkin LED Controller. Support for REV Robotics 2m Distance Sensor. Added support for a REV Touch Sensor (no longer have to configure as a generic digital device). Added blocks for DcMotorEx methods. These are enhanced methods that you can use when supported by the motor controller hardware. The REV Robotics Expansion Hub supports these enhanced methods. Enhanced methods include methods to get/set motor velocity (in encoder pulses per second), get/set PIDF coefficients, etc.. Modest Improvements in Logging Decrease frequency of battery checker voltage statements. Removed non-FTC related log statements (wherever possible). Introduced a "Match Logging" feature. Under "Settings" a user can enable/disable this feature (it's disabled by default). If enabled, user provides a "Match Number" through the Driver Station user interface (top of the screen). The Match Number is used to create a log file specifically with log statements from that particular Op Mode run. Match log files are stored in /sdcard/FIRST/matlogs on the Robot Controller. Once an op mode run is complete, the Match Number is cleared. This is a convenient way to create a separate match log with statements only related to a specific op mode run. New Devices Support for REV Robotics Blinkin LED Controller. Support for REV Robotics 2m Distance Sensor. Added configuration option for REV 20:1 HD Hex Motor. Added support for a REV Touch Sensor (no longer have to configure as a generic digital device). Miscellaneous Fixed some errors in the definitions for acceleration and velocity in our javadoc documentation. Added ability to play audio files on Driver Station When user is configuring an Expansion Hub, the LED on the Expansion Hub will change blink pattern (purple-cyan) to indicate which Hub is currently being configured. Renamed I2cSensorType to I2cDeviceType. Added an external sample Op Mode that demonstrates localization using 2018-2019 (Rover Ruckus presented by QualComm) Vuforia targets. Added an external sample Op Mode that demonstrates how to use the REV Robotics 2m Laser Distance Sensor. Added an external sample Op Mode that demonstrates how to use the REV Robotics Blinkin LED Controller. Re-categorized external Java sample Op Modes to "TeleOp" instead of "Autonomous". Known issues: Initial support for UVC compatible cameras UVC cameras seem to draw significant amount of current from the USB bus. This does not appear to present any problems for the REV Robotics Control Hub. This does seem to create stability problems when using some cameras with an Android phone-based Robot Controller. FTC Tech Team is investigating options to mitigate this issue with the phone-based Robot Controllers. There might be a possible deadlock which causes the RC to become unresponsive when using a UVC webcam with a Nougat Android Robot Controller. Wireless When user selects a wireless channel, this channel does not necessarily persist if the phone is power cycled. Tech Team is hoping to eventually address this issue in a future release. Issue has been present since apps were introduced (i.e., it is not new with the v4.0 release). Wireless channel is not currently displayed for WiFi Direct connections. Miscellaneous The blink indication feature that shows which Expansion Hub is currently being configured does not work for a newly created configuration file. User has to first save a newly created configuration file and then close and re-edit the file in order for blink indicator to work. Version 3.6 (built on 17.12.18) Changes include: Blocks Changes Uses updated Google Blockly software to allow users to edit their op modes on Apple iOS devices (including iPad and iPhone). Improvement in Blocks tool to handle corrupt op mode files. Autonomous op modes should no longer get switched back to tele-op after re-opening them to be edited. The system can now detect type mismatches during runtime and alert the user with a message on the Driver Station. Updated javadoc documentation for setPower() method to reflect correct range of values (-1 to +1). Modified VuforiaLocalizerImpl to allow for user rendering of frames Added a user-overrideable onRenderFrame() method which gets called by the class's renderFrame() method. Version 3.5 (built on 17.10.30) Changes with version 3.5 include: Introduced a fix to prevent random op mode stops, which can occur after the Robot Controller app has been paused and then resumed (for example, when a user temporarily turns off the display of the Robot Controller phone, and then turns the screen back on). Introduced a fix to prevent random op mode stops, which were previously caused by random peer disconnect events on the Driver Station. Fixes issue where log files would be closed on pause of the RC or DS, but not re-opened upon resume. Fixes issue with battery handler (voltage) start/stop race. Fixes issue where Android Studio generated op modes would disappear from available list in certain situations. Fixes problem where OnBot Java would not build on REV Robotics Control Hub. Fixes problem where OnBot Java would not build if the date and time on the Robot Controller device was "rewound" (set to an earlier date/time). Improved error message on OnBot Java that occurs when renaming a file fails. Removed unneeded resources from android.jar binaries used by OnBot Java to reduce final size of Robot Controller app. Added MR_ANALOG_TOUCH_SENSOR block to Blocks Programming Tool. Version 3.4 (built on 17.09.06) Changes with version 3.4 include: Added telemetry.update() statement for BlankLinearOpMode template. Renamed sample Block op modes to be more consistent with Java samples. Added some additional sample Block op modes. Reworded OnBot Java readme slightly. Version 3.3 (built on 17.09.04) This version of the software includes improves for the FTC Blocks Programming Tool and the OnBot Java Programming Tool. Changes with verion 3.3 include: Android Studio ftc_app project has been updated to use Gradle Plugin 2.3.3. Android Studio ftc_app project is already using gradle 3.5 distribution. Robot Controller log has been renamed to /sdcard/RobotControllerLog.txt (note that this change was actually introduced w/ v3.2). Improvements in I2C reliability. Optimized I2C read for REV Expansion Hub, with v1.7 firmware or greater. Updated all external/samples (available through OnBot and in Android project folder). Vuforia Added support for VuMarks that will be used for the 2017-2018 season game. Blocks Update to latest Google Blockly release. Sample op modes can be selected as a template when creating new op mode. Fixed bug where the blocks would disappear temporarily when mouse button is held down. Added blocks for Range.clip and Range.scale. User can now disable/enable Block op modes. Fix to prevent occasional Blocks deadlock. OnBot Java Significant improvements with autocomplete function for OnBot Java editor. Sample op modes can be selected as a template when creating new op mode. Fixes and changes to complete hardware setup feature. Updated (and more useful) onBot welcome message. Known issues: Android Studio After updating to the new v3.3 Android Studio project folder, if you get error messages indicating "InvalidVirtualFileAccessException" then you might need to do a File->Invalidate Caches / Restart to clear the error. OnBot Java Sometimes when you push the build button to build all op modes, the RC returns an error message that the build failed. If you press the build button a second time, the build typically suceeds. Version 3.2 (built on 17.08.02) This version of the software introduces the "OnBot Java" Development Tool. Similar to the FTC Blocks Development Tool, the FTC OnBot Java Development Tool allows a user to create, edit and build op modes dynamically using only a Javascript-enabled web browser. The OnBot Java Development Tool is an integrated development environment (IDE) that is served up by the Robot Controller. Op modes are created and edited using a Javascript-enabled browser (Google Chromse is recommended). Op modes are saved on the Robot Controller Android device directly. The OnBot Java Development Tool provides a Java programming environment that does NOT need Android Studio. Changes with version 3.2 include: Enhanced web-based development tools Introduction of OnBot Java Development Tool. Web-based programming and management features are "always on" (user no longer needs to put Robot Controller into programming mode). Web-based management interface (where user can change Robot Controller name and also easily download Robot Controller log file). OnBot Java, Blocks and Management features available from web based interface. Blocks Programming Development Tool: Changed "LynxI2cColorRangeSensor" block to "REV Color/range sensor" block. Fixed tooltip for ColorSensor.isLightOn block. Added blocks for ColorSensor.getNormalizedColors and LynxI2cColorRangeSensor.getNormalizedColors. Added example op modes for digital touch sensor and REV Robotics Color Distance sensor. User selectable color themes. Includes many minor enhancements and fixes (too numerous to list). Known issues: Auto complete function is incomplete and does not support the following (for now): Access via this keyword Access via super keyword Members of the super cloass, not overridden by the class Any methods provided in the current class Inner classes Can't handle casted objects Any objects coming from an parenthetically enclosed expression Version 3.10 (built on 17.05.09) This version of the software provides support for the REV Robotics Expansion Hub. This version also includes improvements in the USB communication layer in an effort to enhance system resiliency. If you were using a 2.x version of the software previously, updating to version 3.1 requires that you also update your Driver Station software in addition to updating the Robot Controller software. Also note that in version 3.10 software, the setMaxSpeed and getMaxSpeed methods are no longer available (not deprecated, they have been removed from the SDK). Also note that the the new 3.x software incorporates motor profiles that a user can select as he/she configures the robot. Changes include: Blocks changes Added VuforiaTrackableDefaultListener.getPose and Vuforia.trackPose blocks. Added optimized blocks support for Vuforia extended tracking. Added atan2 block to the math category. Added useCompetitionFieldTargetLocations parameter to Vuforia.initialize block. If set to false, the target locations are placed at (0,0,0) with target orientation as specified in https://github.com/gearsincorg/FTCVuforiaDemo/blob/master/Robot_Navigation.java tutorial op mode. Incorporates additional improvements to USB comm layer to improve system resiliency (to recover from a greater number of communication disruptions). Additional Notes Regarding Version 3.00 (built on 17.04.13) In addition to the release changes listed below (see section labeled "Version 3.00 (built on 17.04.013)"), version 3.00 has the following important changes: Version 3.00 software uses a new version of the FTC Robocol (robot protocol). If you upgrade to v3.0 on the Robot Controller and/or Android Studio side, you must also upgrade the Driver Station software to match the new Robocol. Version 3.00 software removes the setMaxSpeed and getMaxSpeed methods from the DcMotor class. If you have an op mode that formerly used these methods, you will need to remove the references/calls to these methods. Instead, v3.0 provides the max speed information through the use of motor profiles that are selected by the user during robot configuration. Version 3.00 software currently does not have a mechanism to disable extra i2c sensors. We hope to re-introduce this function with a release in the near future. Version 3.00 (built on 17.04.13) *** Use this version of the software at YOUR OWN RISK!!! *** This software is being released as an "alpha" version. Use this version at your own risk! This pre-release software contains SIGNIFICANT changes, including changes to the Wi-Fi Direct pairing mechanism, rewrites of the I2C sensor classes, changes to the USB/FTDI layer, and the introduction of support for the REV Robotics Expansion Hub and the REV Robotics color-range-light sensor. These changes were implemented to improve the reliability and resiliency of the FTC control system. Please note, however, that version 3.00 is considered "alpha" code. This code is being released so that the FIRST community will have an opportunity to test the new REV Expansion Hub electronics module when it becomes available in May. The developers do not recommend using this code for critical applications (i.e., competition use). *** Use this version of the software at YOUR OWN RISK!!! *** Changes include: Major rework of sensor-related infrastructure. Includes rewriting sensor classes to implement synchronous I2C communication. Fix to reset Autonomous timer back to 30 seconds. Implementation of specific motor profiles for approved 12V motors (includes Tetrix, AndyMark, Matrix and REV models). Modest improvements to enhance Wi-Fi P2P pairing. Fixes telemetry log addition race. Publishes all the sources (not just a select few). Includes Block programming improvements Addition of optimized Vuforia blocks. Auto scrollbar to projects and sounds pages. Fixed blocks paste bug. Blocks execute after while-opModeIsActive loop (to allow for cleanup before exiting op mode). Added gyro integratedZValue block. Fixes bug with projects page for Firefox browser. Added IsSpeaking block to AndroidTextToSpeech. Implements support for the REV Robotics Expansion Hub Implements support for integral REV IMU (physically installed on I2C bus 0, uses same Bosch BNO055 9 axis absolute orientation sensor as Adafruit 9DOF abs orientation sensor). - Implements support for REV color/range/light sensor. Provides support to update Expansion Hub firmware through FTC SDK. Detects REV firmware version and records in log file. Includes support for REV Control Hub (note that the REV Control Hub is not yet approved for FTC use). Implements FTC Blocks programming support for REV Expansion Hub and sensor hardware. Detects and alerts when I2C device disconnect. Version 2.62 (built on 17.01.07) Added null pointer check before calling modeToByte() in finishModeSwitchIfNecessary method for ModernRoboticsUsbDcMotorController class. Changes to enhance Modern Robotics USB protocol robustness. Version 2.61 (released on 16.12.19) Blocks Programming mode changes: Fix to correct issue when an exception was thrown because an OpticalDistanceSensor object appears twice in the hardware map (the second time as a LightSensor). Version 2.6 (released on 16.12.16) Fixes for Gyro class: Improve (decrease) sensor refresh latency. fix isCalibrating issues. Blocks Programming mode changes: Blocks now ignores a device in the configuration xml if the name is empty. Other devices work in configuration work fine. Version 2.5 (internal release on released on 16.12.13) Blocks Programming mode changes: Added blocks support for AdafruitBNO055IMU. Added Download Op Mode button to FtcBocks.html. Added support for copying blocks in one OpMode and pasting them in an other OpMode. The clipboard content is stored on the phone, so the programming mode server must be running. Modified Utilities section of the toolbox. In Programming Mode, display information about the active connections. Fixed paste location when workspace has been scrolled. Added blocks support for the android Accelerometer. Fixed issue where Blocks Upload Op Mode truncated name at first dot. Added blocks support for Android SoundPool. Added type safety to blocks for Acceleration. Added type safety to blocks for AdafruitBNO055IMU.Parameters. Added type safety to blocks for AnalogInput. Added type safety to blocks for AngularVelocity. Added type safety to blocks for Color. Added type safety to blocks for ColorSensor. Added type safety to blocks for CompassSensor. Added type safety to blocks for CRServo. Added type safety to blocks for DigitalChannel. Added type safety to blocks for ElapsedTime. Added type safety to blocks for Gamepad. Added type safety to blocks for GyroSensor. Added type safety to blocks for IrSeekerSensor. Added type safety to blocks for LED. Added type safety to blocks for LightSensor. Added type safety to blocks for LinearOpMode. Added type safety to blocks for MagneticFlux. Added type safety to blocks for MatrixF. Added type safety to blocks for MrI2cCompassSensor. Added type safety to blocks for MrI2cRangeSensor. Added type safety to blocks for OpticalDistanceSensor. Added type safety to blocks for Orientation. Added type safety to blocks for Position. Added type safety to blocks for Quaternion. Added type safety to blocks for Servo. Added type safety to blocks for ServoController. Added type safety to blocks for Telemetry. Added type safety to blocks for Temperature. Added type safety to blocks for TouchSensor. Added type safety to blocks for UltrasonicSensor. Added type safety to blocks for VectorF. Added type safety to blocks for Velocity. Added type safety to blocks for VoltageSensor. Added type safety to blocks for VuforiaLocalizer.Parameters. Added type safety to blocks for VuforiaTrackable. Added type safety to blocks for VuforiaTrackables. Added type safety to blocks for enums in AdafruitBNO055IMU.Parameters. Added type safety to blocks for AndroidAccelerometer, AndroidGyroscope, AndroidOrientation, and AndroidTextToSpeech. Version 2.4 (released on 16.11.13) Fix to avoid crashing for nonexistent resources. Blocks Programming mode changes: Added blocks to support OpenGLMatrix, MatrixF, and VectorF. Added blocks to support AngleUnit, AxesOrder, AxesReference, CameraDirection, CameraMonitorFeedback, DistanceUnit, and TempUnit. Added blocks to support Acceleration. Added blocks to support LinearOpMode.getRuntime. Added blocks to support MagneticFlux and Position. Fixed typos. Made blocks for ElapsedTime more consistent with other objects. Added blocks to support Quaternion, Velocity, Orientation, AngularVelocity. Added blocks to support VuforiaTrackables, VuforiaTrackable, VuforiaLocalizer, VuforiaTrackableDefaultListener. Fixed a few blocks. Added type checking to new blocks. Updated to latest blockly. Added default variable blocks to navigation and matrix blocks. Fixed toolbox entry for openGLMatrix_rotation_withAxesArgs. When user downloads Blocks-generated op mode, only the .blk file is downloaded. When user uploads Blocks-generated op mode (.blk file), Javascript code is auto generated. Added DbgLog support. Added logging when a blocks file is read/written. Fixed bug to properly render blocks even if missing devices from configuration file. Added support for additional characters (not just alphanumeric) for the block file names (for download and upload). Added support for OpMode flavor (“Autonomous” or “TeleOp”) and group. Changes to Samples to prevent tutorial issues. Incorporated suggested changes from public pull 216 (“Replace .. paths”). Remove Servo Glitches when robot stopped. if user hits “Cancels” when editing a configuration file, clears the unsaved changes and reverts to original unmodified configuration. Added log info to help diagnose why the Robot Controller app was terminated (for example, by watch dog function). Added ability to transfer log from the controller. Fixed inconsistency for AngularVelocity Limit unbounded growth of data for telemetry. If user does not call telemetry.update() for LinearOpMode in a timely manner, data added for telemetry might get lost if size limit is exceeded. Version 2.35 (released on 16.10.06) Blockly programming mode - Removed unnecesary idle() call from blocks for new project. Version 2.30 (released on 16.10.05) Blockly programming mode: Mechanism added to save Blockly op modes from Programming Mode Server onto local device To avoid clutter, blocks are displayed in categorized folders Added support for DigitalChannel Added support for ModernRoboticsI2cCompassSensor Added support for ModernRoboticsI2cRangeSensor Added support for VoltageSensor Added support for AnalogInput Added support for AnalogOutput Fix for CompassSensor setMode block Vuforia Fix deadlock / make camera data available while Vuforia is running. Update to Vuforia 6.0.117 (recommended by Vuforia and Google to close security loophole). Fix for autonomous 30 second timer bug (where timer was in effect, even though it appeared to have timed out). opModeIsActive changes to allow cleanup after op mode is stopped (with enforced 2 second safety timeout). Fix to avoid reading i2c twice. Updated sample Op Modes. Improved logging and fixed intermittent freezing. Added digital I/O sample. Cleaned up device names in sample op modes to be consistent with Pushbot guide. Fix to allow use of IrSeekerSensorV3. Version 2.20 (released on 16.09.08) Support for Modern Robotics Compass Sensor. Support for Modern Robotics Range Sensor. Revise device names for Pushbot templates to match the names used in Pushbot guide. Fixed bug so that IrSeekerSensorV3 device is accessible as IrSeekerSensor in hardwareMap. Modified computer vision code to require an individual Vuforia license (per legal requirement from PTC). Minor fixes. Blockly enhancements: Support for Voltage Sensor. Support for Analog Input. Support for Analog Output. Support for Light Sensor. Support for Servo Controller. Version 2.10 (released on 16.09.03) Support for Adafruit IMU. Improvements to ModernRoboticsI2cGyro class Block on reset of z axis. isCalibrating() returns true while gyro is calibration. Updated sample gyro program. Blockly enhancements support for android.graphics.Color. added support for ElapsedTime. improved look and legibility of blocks. support for compass sensor. support for ultrasonic sensor. support for IrSeeker. support for LED. support for color sensor. support for CRServo prompt user to configure robot before using programming mode. Provides ability to disable audio cues. various bug fixes and improvements. Version 2.00 (released on 16.08.19) This is the new release for the upcoming 2016-2017 FIRST Tech Challenge Season. Channel change is enabled in the FTC Robot Controller app for Moto G 2nd and 3rd Gen phones. Users can now use annotations to register/disable their Op Modes. Changes in the Android SDK, JDK and build tool requirements (minsdk=19, java 1.7, build tools 23.0.3). Standardized units in analog input. Cleaned up code for existing analog sensor classes. setChannelMode and getChannelMode were REMOVED from the DcMotorController class. This is important - we no longer set the motor modes through the motor controller. setMode and getMode were added to the DcMotor class. ContinuousRotationServo class has been added to the FTC SDK. Range.clip() method has been overloaded so it can support this operation for int, short and byte integers. Some changes have been made (new methods added) on how a user can access items from the hardware map. Users can now set the zero power behavior for a DC motor so that the motor will brake or float when power is zero. Prototype Blockly Programming Mode has been added to FTC Robot Controller. Users can place the Robot Controller into this mode, and then use a device (such as a laptop) that has a Javascript enabled browser to write Blockly-based Op Modes directly onto the Robot Controller. Users can now configure the robot remotely through the FTC Driver Station app. Android Studio project supports Android Studio 2.1.x and compile SDK Version 23 (Marshmallow). Vuforia Computer Vision SDK integrated into FTC SDK. Users can use sample vision targets to get localization information on a standard FTC field. Project structure has been reorganized so that there is now a TeamCode package that users can use to place their local/custom Op Modes into this package. Inspection function has been integrated into the FTC Robot Controller and Driver Station Apps (Thanks Team HazMat… 9277 & 10650!). Audio cues have been incorporated into FTC SDK. Swap mechanism added to FTC Robot Controller configuration activity. For example, if you have two motor controllers on a robot, and you misidentified them in your configuration file, you can use the Swap button to swap the devices within the configuration file (so you do not have to manually re-enter in the configuration info for the two devices). Fix mechanism added to all user to replace an electronic module easily. For example, suppose a servo controller dies on your robot. You replace the broken module with a new module, which has a different serial number from the original servo controller. You can use the Fix button to automatically reconfigure your configuration file to use the serial number of the new module. Improvements made to fix resiliency and responsiveness of the system. For LinearOpMode the user now must for a telemetry.update() to update the telemetry data on the driver station. This update() mechanism ensures that the driver station gets the updated data properly and at the same time. The Auto Configure function of the Robot Controller is now template based. If there is a commonly used robot configuration, a template can be created so that the Auto Configure mechanism can be used to quickly configure a robot of this type. The logic to detect a runaway op mode (both in the LinearOpMode and OpMode types) and to abort the run, then auto recover has been improved/implemented. Fix has been incorporated so that Logitech F310 gamepad mappings will be correct for Marshmallow users. Release 16.07.08 For the ftc_app project, the gradle files have been modified to support Android Studio 2.1.x. Release 16.03.30 For the MIT App Inventor, the design blocks have new icons that better represent the function of each design component. Some changes were made to the shutdown logic to ensure the robust shutdown of some of our USB services. A change was made to LinearOpMode so as to allow a given instance to be executed more than once, which is required for the App Inventor. Javadoc improved/updated. Release 16.03.09 Changes made to make the FTC SDK synchronous (significant change!) waitOneFullHardwareCycle() and waitForNextHardwareCycle() are no longer needed and have been deprecated. runOpMode() (for a LinearOpMode) is now decoupled from the system's hardware read/write thread. loop() (for an OpMode) is now decoupled from the system's hardware read/write thread. Methods are synchronous. For example, if you call setMode(DcMotorController.RunMode.RESET_ENCODERS) for a motor, the encoder is guaranteed to be reset when the method call is complete. For legacy module (NXT compatible), user no longer has to toggle between read and write modes when reading from or writing to a legacy device. Changes made to enhance reliability/robustness during ESD event. Changes made to make code thread safe. Debug keystore added so that user-generated robot controller APKs will all use the same signed key (to avoid conflicts if a team has multiple developer laptops for example). Firmware version information for Modern Robotics modules are now logged. Changes made to improve USB comm reliability and robustness. Added support for voltage indicator for legacy (NXT-compatible) motor controllers. Changes made to provide auto stop capabilities for op modes. A LinearOpMode class will stop when the statements in runOpMode() are complete. User does not have to push the stop button on the driver station. If an op mode is stopped by the driver station, but there is a run away/uninterruptible thread persisting, the app will log an error message then force itself to crash to stop the runaway thread. Driver Station UI modified to display lowest measured voltage below current voltage (12V battery). Driver Station UI modified to have color background for current voltage (green=good, yellow=caution, red=danger, extremely low voltage). javadoc improved (edits and additional classes). Added app build time to About activity for driver station and robot controller apps. Display local IP addresses on Driver Station About activity. Added I2cDeviceSynchImpl. Added I2cDeviceSync interface. Added seconds() and milliseconds() to ElapsedTime for clarity. Added getCallbackCount() to I2cDevice. Added missing clearI2cPortActionFlag. Added code to create log messages while waiting for LinearOpMode shutdown. Fix so Wifi Direct Config activity will no longer launch multiple times. Added the ability to specify an alternate i2c address in software for the Modern Robotics gyro. Release 16.02.09 Improved battery checker feature so that voltage values get refreshed regularly (every 250 msec) on Driver Station (DS) user interface. Improved software so that Robot Controller (RC) is much more resilient and “self-healing” to USB disconnects: If user attempts to start/restart RC with one or more module missing, it will display a warning but still start up. When running an op mode, if one or more modules gets disconnected, the RC & DS will display warnings,and robot will keep on working in spite of the missing module(s). If a disconnected module gets physically reconnected the RC will auto detect the module and the user will regain control of the recently connected module. Warning messages are more helpful (identifies the type of module that’s missing plus its USB serial number). Code changes to fix the null gamepad reference when users try to reference the gamepads in the init() portion of their op mode. NXT light sensor output is now properly scaled. Note that teams might have to readjust their light threshold values in their op modes. On DS user interface, gamepad icon for a driver will disappear if the matching gamepad is disconnected or if that gamepad gets designated as a different driver. Robot Protocol (ROBOCOL) version number info is displayed in About screen on RC and DS apps. Incorporated a display filter on pairing screen to filter out devices that don’t use the “-“ format. This filter can be turned off to show all WiFi Direct devices. Updated text in License file. Fixed formatting error in OpticalDistanceSensor.toString(). Fixed issue on with a blank (“”) device name that would disrupt WiFi Direct Pairing. Made a change so that the WiFi info and battery info can be displayed more quickly on the DS upon connecting to RC. Improved javadoc generation. Modified code to make it easier to support language localization in the future. Release 16.01.04 Updated compileSdkVersion for apps Prevent Wifi from entering power saving mode removed unused import from driver station Corrrected "Dead zone" joystick code. LED.getDeviceName and .getConnectionInfo() return null apps check for ROBOCOL_VERSION mismatch Fix for Telemetry also has off-by-one errors in its data string sizing / short size limitations error User telemetry output is sorted. added formatting variants to DbgLog and RobotLog APIs code modified to allow for a long list of op mode names. changes to improve thread safety of RobocolDatagramSocket Fix for "missing hardware leaves robot controller disconnected from driver station" error fix for "fast tapping of Init/Start causes problems" (toast is now only instantiated on UI thread). added some log statements for thread life cycle. moved gamepad reset logic inside of initActiveOpMode() for robustness changes made to mitigate risk of race conditions on public methods. changes to try and flag when WiFi Direct name contains non-printable characters. fix to correct race condition between .run() and .close() in ReadWriteRunnableStandard. updated FTDI driver made ReadWriteRunnableStanard interface public. fixed off-by-one errors in Command constructor moved specific hardware implmentations into their own package. moved specific gamepad implemnatations to the hardware library. changed LICENSE file to new BSD version. fixed race condition when shutting down Modern Robotics USB devices. methods in the ColorSensor classes have been synchronized. corrected isBusy() status to reflect end of motion. corrected "back" button keycode. the notSupported() method of the GyroSensor class was changed to protected (it should not be public). Release 15.11.04.001 Added Support for Modern Robotics Gyro. The GyroSensor class now supports the MR Gyro Sensor. Users can access heading data (about Z axis) Users can also access raw gyro data (X, Y, & Z axes). Example MRGyroTest.java op mode included. Improved error messages More descriptive error messages for exceptions in user code. Updated DcMotor API Enable read mode on new address in setI2cAddress Fix so that driver station app resets the gamepads when switching op modes. USB-related code changes to make USB comm more responsive and to display more explicit error messages. Fix so that USB will recover properly if the USB bus returns garbage data. Fix USB initializtion race condition. Better error reporting during FTDI open. More explicit messages during USB failures. Fixed bug so that USB device is closed if event loop teardown method was not called. Fixed timer UI issue Fixed duplicate name UI bug (Legacy Module configuration). Fixed race condition in EventLoopManager. Fix to keep references stable when updating gamepad. For legacy Matrix motor/servo controllers removed necessity of appending "Motor" and "Servo" to controller names. Updated HT color sensor driver to use constants from ModernRoboticsUsbLegacyModule class. Updated MR color sensor driver to use constants from ModernRoboticsUsbDeviceInterfaceModule class. Correctly handle I2C Address change in all color sensors Updated/cleaned up op modes. Updated comments in LinearI2cAddressChange.java example op mode. Replaced the calls to "setChannelMode" with "setMode" (to match the new of the DcMotor method). Removed K9AutoTime.java op mode. Added MRGyroTest.java op mode (demonstrates how to use MR Gyro Sensor). Added MRRGBExample.java op mode (demonstrates how to use MR Color Sensor). Added HTRGBExample.java op mode (demonstrates how to use HT legacy color sensor). Added MatrixControllerDemo.java (demonstrates how to use legacy Matrix controller). Updated javadoc documentation. Updated release .apk files for Robot Controller and Driver Station apps. Release 15.10.06.002 Added support for Legacy Matrix 9.6V motor/servo controller. Cleaned up build.gradle file. Minor UI and bug fixes for driver station and robot controller apps. Throws error if Ultrasonic sensor (NXT) is not configured for legacy module port 4 or 5. Release 15.08.03.001 New user interfaces for FTC Driver Station and FTC Robot Controller apps. An init() method is added to the OpMode class. For this release, init() is triggered right before the start() method. Eventually, the init() method will be triggered when the user presses an "INIT" button on driver station. The init() and loop() methods are now required (i.e., need to be overridden in the user's op mode). The start() and stop() methods are optional. A new LinearOpMode class is introduced. Teams can use the LinearOpMode mode to create a linear (not event driven) program model. Teams can use blocking statements like Thread.sleep() within a linear op mode. The API for the Legacy Module and Core Device Interface Module have been updated. Support for encoders with the Legacy Module is now working. The hardware loop has been updated for better performance.
kaustubh-sadekar / VirtualCamVirtual camera is created only using opencv and numpy. It simulates a camera where we can control all its parameters, intrinsic and extrinsic to get a better understanding how each component in the camera projection matrix affects the final image of the object captured by the camera.
youxiaochen / WheelView 3dCamera+Matrix+RecyclerView 实现仿IOS滚轮时间选择,垂直,水平方向WheelView 3d效果
ZXingYe / SurfaceBridge用于Android平台,可将Surface图像数据快速提取出来的工具类,Surface数据源可以来自MediaCodec、Camera、VirtualDisplay等。 SurfaceBridge支持多种输出格式,比如RGB、YUV420、YUV444等等。当然,你也可以直接把SurfaceView、TextureView作为输出源。同时为了兼容各种不同的输出大小和比例,SurfaceBridge支持传入一个Matrix参数去控制图像的变换。
keijiro / Unity Oblique ProjectionProvides an oblique projection matrix for a camera.
georgiee / Lab PixicamA matrix based 2d camera to use in pixi.js
zak-45 / WLEDVideoSyncCast video, image, Url, phone camera to 2D Led Matrix using e131 artNet or DDP ( e.g: WLED ...)
kaustubh-sadekar / FunMirrorsThis is a fun project I created to motivate computer vision enthusiasts and to highlight the importance of understanding fundamental concepts related to image formation in a camera.
rprokap / EntremanureOnce upon a time there was a lovely princess. But she had an enchantment upon her of a fearful sort which could only be broken by love's first kiss. She was locked away in a castle guarded by a terrible fire-breathing dragon. Many brave knights had attempted to free her from this dreadful prison, but non prevailed. She waited in the dragon's keep in the highest room of the tallest tower for her true love and true love's first kiss. (laughs) Like that's ever gonna happen. What a load of - (toilet flush) Allstar - by Smashmouth begins to play. Shrek goes about his day. While in a nearby town, the villagers get together to go after the ogre. NIGHT - NEAR SHREK'S HOME MAN1 Think it's in there? MAN2 All right. Let's get it! MAN1 Whoa. Hold on. Do you know what that thing can do to you? MAN3 Yeah, it'll grind your bones for it's bread. Shrek sneaks up behind them and laughs. SHREK Yes, well, actually, that would be a giant. Now, ogres, oh they're much worse. They'll make a suit from your freshly peeled skin. MEN No! SHREK They'll shave your liver. Squeeze the jelly from your eyes! Actually, it's quite good on toast. MAN1 Back! Back, beast! Back! I warn ya! (waves the torch at Shrek.) Shrek calmly licks his fingers and extinguishes the torch. The men shrink back away from him. Shrek roars very loudly and long and his breath extinguishes all the remaining torches until the men are in the dark. SHREK This is the part where you run away. (The men scramble to get away. He laughs.) And stay out! (looks down and picks up a piece of paper. Reads.) "Wanted. Fairy tale creatures."(He sighs and throws the paper over his shoulder.) THE NEXT DAY There is a line of fairy tale creatures. The head of the guard sits at a table paying people for bringing the fairy tale creatures to him. There are cages all around. Some of the people in line are Peter Pan, who is carrying Tinkerbell in a cage, Gipetto who's carrying Pinocchio, and a farmer who is carrying the three little pigs. GUARD All right. This one's full. Take it away! Move it along. Come on! Get up! HEAD GUARD Next! GUARD (taking the witch's broom) Give me that! Your flying days are over. (breaks the broom in half) HEAD GUARD That's 20 pieces of silver for the witch. Next! GUARD Get up! Come on! HEAD GUARD Twenty pieces. LITTLE BEAR (crying) This cage is too small. DONKEY Please, don't turn me in. I'll never be stubborn again. I can change. Please! Give me another chance! OLD WOMAN Oh, shut up. (jerks his rope) DONKEY Oh! HEAD GUARD Next! What have you got? GIPETTO This little wooden puppet. PINOCCHIO I'm not a puppet. I'm a real boy. (his nose grows) HEAD GUARD Five shillings for the possessed toy. Take it away. PINOCCHIO Father, please! Don't let them do this! Help me! Gipetto takes the money and walks off. The old woman steps up to the table. HEAD GUARD Next! What have you got? OLD WOMAN Well, I've got a talking donkey. HEAD GUARD Right. Well, that's good for ten shillings, if you can prove it. OLD WOMAN Oh, go ahead, little fella. Donkey just looks up at her. HEAD GUARD Well? OLD WOMAN Oh, oh, he's just...he's just a little nervous. He's really quite a chatterbox. Talk, you boneheaded dolt... HEAD GUARD That's it. I've heard enough. Guards! OLD WOMAN No, no, he talks! He does. (pretends to be Donkey) I can talk. I love to talk. I'm the talkingest damn thing you ever saw. HEAD GUARD Get her out of my sight. OLD WOMAN No, no! I swear! Oh! He can talk! The guards grab the old woman and she struggles with them. One of her legs flies out and kicks Tinkerbell out of Peter Pan's hands, and her cage drops on Donkey's head. He gets sprinkled with fairy dust and he's able to fly. DONKEY Hey! I can fly! PETER PAN He can fly! 3 LITTLE PIGS He can fly! HEAD GUARD He can talk! DONKEY Ha, ha! That's right, fool! Now I'm a flying, talking donkey. You might have seen a housefly, maybe even a superfly but I bet you ain't never seen a donkey fly. Ha, ha! (the pixie dust begins to wear off) Uh-oh. (he begins to sink to the ground.) He hits the ground with a thud. HEAD GUARD Seize him! (Donkey takes of running.) After him! GUARDS He's getting away! Get him! This way! Turn! Donkey keeps running and he eventually runs into Shrek. Literally. Shrek turns around to see who bumped into him. Donkey looks scared for a moment then he spots the guards coming up the path. He quickly hides behind Shrek. HEAD GUARD You there. Ogre! SHREK Aye? HEAD GUARD By the order of Lord Farquaad I am authorized to place you both under arrest and transport you to a designated resettlement facility. SHREK Oh, really? You and what army? He looks behind the guard and the guard turns to look as well and we see that the other men have run off. The guard tucks tail and runs off. Shrek laughs and goes back about his business and begins walking back to his cottage. DONKEY Can I say something to you? Listen, you was really, really, really somethin' back here. Incredible! SHREK Are you talkin' to...(he turns around and Donkey is gone) me? (he turns back around and Donkey is right in front of him.) Whoa! DONKEY Yes. I was talkin' to you. Can I tell you that you that you was great back here? Those guards! They thought they was all of that. Then you showed up, and bam! They was trippin' over themselves like babes in the woods. That really made me feel good to see that. SHREK Oh, that's great. Really. DONKEY Man, it's good to be free. SHREK Now, why don't you go celebrate your freedom with your own friends? Hmm? DONKEY But, uh, I don't have any friends. And I'm not goin' out there by myself. Hey, wait a minute! I got a great idea! I'll stick with you. You're mean, green, fightin' machine. Together we'll scare the spit out of anybody that crosses us. Shrek turns and regards Donkey for a moment before roaring very loudly. DONKEY Oh, wow! That was really scary. If you don't mind me sayin', if that don't work, your breath certainly will get the job done, 'cause you definitely need some Tic Tacs or something, 'cause you breath stinks! You almost burned the hair outta my nose, just like the time...(Shrek covers his mouth but Donkey continues to talk, so Shrek removes his hand.) ...then I ate some rotten berries. I had strong gases leaking out of my butt that day. SHREK Why are you following me? DONKEY I'll tell you why. (singing) 'Cause I'm all alone, There's no one here beside me, My problems have all gone, There's no one to deride me, But you gotta have faith... SHREK Stop singing! It's no wonder you don't have any friends. DONKEY Wow. Only a true friend would be that cruelly honest. SHREK Listen, little donkey. Take a look at me. What am I? DONKEY (looks all the way up at Shrek) Uh ...really tall? SHREK No! I'm an ogre! You know. "Grab your torch and pitchforks." Doesn't that bother you? DONKEY Nope. SHREK Really? DONKEY Really, really. SHREK Oh. DONKEY Man, I like you. What's you name? SHREK Uh, Shrek. DONKEY Shrek? Well, you know what I like about you, Shrek? You got that kind of I-don't-care-what-nobody-thinks-of-me thing. I like that. I respect that, Shrek. You all right. (They come over a hill and you can see Shrek's cottage.) Whoa! Look at that. Who'd want to live in place like that? SHREK That would be my home. DONKEY Oh! And it is lovely! Just beautiful. You know you are quite a decorator. It's amazing what you've done with such a modest budget. I like that boulder. That is a nice boulder. I guess you don't entertain much, do you? SHREK I like my privacy. DONKEY You know, I do too. That's another thing we have in common. Like I hate it when you got somebody in your face. You've trying to give them a hint, and they won't leave. There's that awkward silence. (awkward silence) Can I stay with you? SHREK Uh, what? DONKEY Can I stay with you, please? SHREK (sarcastically) Of course! DONKEY Really? SHREK No. DONKEY Please! I don't wanna go back there! You don't know what it's like to be considered a freak. (pause while he looks at Shrek) Well, maybe you do. But that's why we gotta stick together. You gotta let me stay! Please! Please! SHREK Okay! Okay! But one night only. DONKEY Ah! Thank you! (he runs inside the cottage) SHREK What are you...? (Donkey hops up onto a chair.) No! No! DONKEY This is gonna be fun! We can stay up late, swappin' manly stories, and in the mornin' I'm makin' waffles. SHREK Oh! DONKEY Where do, uh, I sleep? SHREK (irritated) Outside! DONKEY Oh, well, I guess that's cool. I mean, I don't know you, and you don't know me, so I guess outside is best, you know. Here I go. Good night. (Shrek slams the door.) (sigh) I mean, I do like the outdoors. I'm a donkey. I was born outside. I'll just be sitting by myself outside, I guess, you know. By myself, outside. I'm all alone...there's no one here beside me... SHREK'S COTTAGE - NIGHT Shrek is getting ready for dinner. He sits himself down and lights a candle made out of earwax. He begins to eat when he hears a noise. He stands up with a huff. SHREK (to Donkey) I thought I told you to stay outside. DONKEY (from the window) I am outside. There is another noise and Shrek turns to find the person that made the noise. He sees several shadows moving. He finally turns and spots 3 blind mice on his table. BLIND MOUSE1 Well, gents, it's a far cry from the farm, but what choice do we have? BLIND MOUSE2 It's not home, but it'll do just fine. GORDO (bouncing on a slug) What a lovely bed. SHREK Got ya. (Grabs a mouse, but it escapes and lands on his shoulder.) GORDO I found some cheese. (bites Shrek's ear) SHREK Ow! GORDO Blah! Awful stuff. BLIND MOUSE1 Is that you, Gordo? GORDO How did you know? SHREK Enough! (he grabs the 3 mice) What are you doing in my house? (He gets bumped from behind and he drops the mice.) Hey! (he turns and sees the Seven Dwarves with Snow White on the table.) Oh, no, no, no. Dead broad off the table. DWARF Where are we supposed to put her? The bed's taken. SHREK Huh? Shrek marches over to the bedroom and throws back the curtain. The Big Bad Wolf is sitting in the bed. The wolf just looks at him. BIG BAD WOLF What? TIME LAPSE Shrek now has the Big Bad Wolf by the collar and is dragging him to the front door. SHREK I live in a swamp. I put up signs. I'm a terrifying ogre! What do I have to do get a little privacy? (He opens the front door to throw the Wolf out and he sees that all the collected Fairy Tale Creatures are on his land.) Oh, no. No! No! The 3 bears sit around the fire, the pied piper is playing his pipe and the rats are all running to him, some elves are directing flight traffic so that the fairies and witches can land...etc. SHREK What are you doing in my swamp? (this echoes and everyone falls silent.) Gasps are heard all around. The 3 good fairies hide inside a tent. SHREK All right, get out of here. All of you, move it! Come on! Let's go! Hapaya! Hapaya! Hey! Quickly. Come on! (more dwarves run inside the house) No, no! No, no. Not there. Not there. (they shut the door on him) Oh! (turns to look at Donkey) DONKEY Hey, don't look at me. I didn't invite them. PINOCCHIO Oh, gosh, no one invited us. SHREK What? PINOCCHIO We were forced to come here. SHREK (flabbergasted) By who? LITTLE PIG Lord Farquaad. He huffed and he puffed and he...signed an eviction notice. SHREK (heavy sigh) All right. Who knows where this Farquaad guy is? Everyone looks around at each other but no one answers. DONKEY Oh, I do. I know where he is. SHREK Does anyone else know where to find him? Anyone at all? DONKEY Me! Me! SHREK Anyone? DONKEY Oh! Oh, pick me! Oh, I know! I know! Me, me! SHREK (sigh) Okay, fine. Attention, all fairy tale things. Do not get comfortable. Your welcome is officially worn out. In fact, I'm gonna see this guy Farquaad right now and get you all off my land and back where you came from! (Pause. Then the crowd goes wild.) Oh! (to Donkey) You! You're comin' with me. DONKEY All right, that's what I like to hear, man. Shrek and Donkey, two stalwart friends, off on a whirlwind big-city adventure. I love it! DONKEY (singing) On the road again. Sing it with me, Shrek. I can't wait to get on the road again. SHREK What did I say about singing? DONKEY Can I whistle? SHREK No. DONKEY Can I hum it? SHREK All right, hum it. Donkey begins to hum 'On the Road Again'. DULOC - KITCHEN A masked man is torturing the Gingerbread Man. He's continually dunking him in a glass of milk. Lord Farquaad walks in. FARQUAAD That's enough. He's ready to talk. The Gingerbread Man is pulled out of the milk and slammed down onto a cookie sheet. Farquaad laughs as he walks over to the table. However when he reaches the table we see that it goes up to his eyes. He clears his throat and the table is lowered. FARQUAAD (he picks up the Gingerbread Man's legs and plays with them) Run, run, run, as fast as you can. You can't catch me. I'm the gingerbread man. GINGERBREAD MAN You are a monster. FARQUAAD I'm not the monster here. You are. You and the rest of that fairy tale trash, poisoning my perfect world. Now, tell me! Where are the others? GINGERBREAD MAN Eat me! (He spits milk into Farquaad's eye.) FARQUAAD I've tried to be fair to you creatures. Now my patience has reached its end! Tell me or I'll...(he makes as if to pull off the Gingerbread Man's buttons) GINGERBREAD MAN No, no, not the buttons. Not my gumdrop buttons. FARQUAAD All right then. Who's hiding them? GINGERBREAD MAN Okay, I'll tell you. Do you know the muffin man? FARQUAAD The muffin man? GINGERBREAD MAN The muffin man. FARQUAAD Yes, I know the muffin man, who lives on Drury Lane? GINGERBREAD MAN Well, she's married to the muffin man. FARQUAAD The muffin man? GINGERBREAD MAN The muffin man! FARQUAAD She's married to the muffin man. The door opens and the Head Guard walks in. HEAD GUARD My lord! We found it. FARQUAAD Then what are you waiting for? Bring it in. More guards enter carrying something that is covered by a sheet. They hang up whatever it is and remove the sheet. It is the Magic Mirror. GINGERBREAD MAN (in awe) Ohhhh... FARQUAAD Magic mirror... GINGERBREAD MAN Don't tell him anything! (Farquaad picks him up and dumps him into a trash can with a lid.) No! FARQUAAD Evening. Mirror, mirror on the wall. Is this not the most perfect kingdom of them all? MIRROR Well, technically you're not a king. FARQUAAD Uh, Thelonius. (Thelonius holds up a hand mirror and smashes it with his fist.) You were saying? MIRROR What I mean is you're not a king yet. But you can become one. All you have to do is marry a princess. FARQUAAD Go on. MIRROR (chuckles nervously) So, just sit back and relax, my lord, because it's time for you to meet today's eligible bachelorettes. And here they are! Bachelorette number one is a mentally abused shut-in from a kingdom far, far away. She likes sushi and hot tubbing anytime. Her hobbies include cooking and cleaning for her two evil sisters. Please welcome Cinderella. (shows picture of Cinderella) Bachelorette number two is a cape-wearing girl from the land of fancy. Although she lives with seven other men, she's not easy. Just kiss her dead, frozen lips and find out what a live wire she is. Come on. Give it up for Snow White! (shows picture of Snow White) And last, but certainly not last, bachelorette number three is a fiery redhead from a dragon-guarded castle surrounded by hot boiling lava! But don't let that cool you off. She's a loaded pistol who likes pina colads and getting caught in the rain. Yours for the rescuing, Princess Fiona! (Shows picture of Princess Fiona) So will it be bachelorette number one, bachelorette number two or bachelorette number three? GUARDS Two! Two! Three! Three! Two! Two! Three! FARQUAAD Three? One? Three? THELONIUS Three! (holds up 2 fingers) Pick number three, my lord! FARQUAAD Okay, okay, uh, number three! MIRROR Lord Farquaad, you've chosen Princess Fiona. FARQUAAD Princess Fiona. She's perfect. All I have to do is just find someone who can go... MIRROR But I probably should mention the little thing that happens at night. FARQUAAD I'll do it. MIRROR Yes, but after sunset... FARQUAAD Silence! I will make this Princess Fiona my queen, and DuLoc will finally have the perfect king! Captain, assemble your finest men. We're going to have a tournament. (smiles evilly) DuLoc Parking Lot - Lancelot Section Shrek and Donkey come out of the field that is right by the parking lot. The castle itself is about 40 stories high. DONKEY But that's it. That's it right there. That's DuLoc. I told ya I'd find it. SHREK So, that must be Lord Farquaad's castle. DONKEY Uh-huh. That's the place. SHREK Do you think maybe he's compensating for something? (He laughs, but then groans as Donkey doesn't get the joke. He continues walking through the parking lot.) DONKEY Hey, wait. Wait up, Shrek. MAN Hurry, darling. We're late. Hurry. SHREK Hey, you! (The attendant, who is wearing a giant head that looks like Lord Farquaad, screams and begins running through the rows of rope to get to the front gate to get away from Shrek.) Wait a second. Look, I'm not gonna eat you. I just - - I just - - (He sighs and then begins walking straight through the rows. The attendant runs into a wall and falls down. Shrek and Donkey look at him then continue on into DuLoc.) DULOC They look around but all is quiet. SHREK It's quiet. Too quiet. Where is everybody? DONKEY Hey, look at this! Donkey runs over and pulls a lever that is attached to a box marked 'Information'. The music winds up and then the box doors open up. There are little wooden people inside and they begin to sing. WOODEN PEOPLE Welcome to DuLoc such a perfect town Here we have some rules Let us lay them down Don't make waves, stay in line And we'll get along fine DuLoc is perfect place Please keep off of the grass Shine your shoes, wipe your... face DuLoc is, DuLoc is DuLoc is perfect place. Suddenly a camera takes Donkey and Shrek's picture. DONKEY Wow! Let's do that again! (makes ready to run over and pull the lever again) SHREK (grabs Donkey's tail and holds him still) No. No. No, no, no! No. They hear a trumpet fanfare and head over to the arena. FARQUAAD Brave knights. You are the best and brightest in all the land. Today one of you shall prove himself... As Shrek and Donkey walk down the tunnel to get into the arena Donkey is humming the DuLoc theme song. SHREK All right. You're going the right way for a smacked bottom. DONKEY Sorry about that. FARQUAAD That champion shall have the honor - - no, no - - the privilege to go forth and rescue the lovely Princess Fiona from the fiery keep of the dragon. If for any reason the winner is unsuccessful, the first runner-up will take his place and so on and so forth. Some of you may die, but it's a sacrifice I am willing to make. (cheers) Let the tournament begin! (He notices Shrek) Oh! What is that? It's hideous! SHREK (turns to look at Donkey and then back at Farquaad) Ah, that's not very nice. It's just a donkey. FARQUAAD Indeed. Knights, new plan! The one who kills the ogre will be named champion! Have it him! MEN Get him! SHREK Oh, hey! Now come on! Hang on now. (bumps into a table where there are mugs of beer) CROWD Go ahead! Get him! SHREK (holds up a mug of beer) Can't we just settle this over a pint? CROWD Kill the beast! SHREK No? All right then. (drinks the beer) Come on! He takes the mug and smashes the spigot off the large barrel of beer behind him. The beer comes rushing out drenching the other men and wetting the ground. It's like mud now. Shrek slides past the men and picks up a spear that one of the men dropped. As Shrek begins to fight Donkey hops up onto one of the larger beer barrels. It breaks free of it's ropes and begins to roll. Donkey manages to squish two men into the mud. There is so much fighting going on here I'm not going to go into detail. Suffice to say that Shrek kicks butt. DONKEY Hey, Shrek, tag me! Tag me! Shrek comes over and bangs a man's head up against Donkeys. Shrek gets up on the ropes and interacts with the crowd. SHREK Yeah! A man tries to sneak up behind Shrek, but Shrek turns in time and sees him. WOMAN The chair! Give him the chair! Shrek smashes a chair over the guys back. Finally all the men are down. Donkey kicks one of them in the helmet, and the ding sounds the end of the match. The audience goes wild. SHREK Oh, yeah! Ah! Ah! Thank you! Thank you very much! I'm here till Thursday. Try the veal! Ha, ha! (laughs) The laughter stops as all of the guards turn their weapons on Shrek. HEAD GUARD Shall I give the order, sir? FARQUAAD No, I have a better idea. People of DuLoc, I give you our champion! SHREK What? FARQUAAD Congratulations, ogre. You're won the honor of embarking on a great and noble quest. SHREK Quest? I'm already in a quest, a quest to get my swamp back. FARQUAAD Your swamp? SHREK Yeah, my swamp! Where you dumped those fairy tale creatures! FARQUAAD Indeed. All right, ogre. I'll make you a deal. Go on this quest for me, and I'll give you your swamp back. SHREK Exactly the way it was? FARQUAAD Down to the last slime-covered toadstool. SHREK And the squatters? FARQUAAD As good as gone. SHREK What kind of quest? Time Lapse - Donkey and Shrek are now walking through the field heading away from DuLoc. Shrek is munching on an onion. DONKEY Let me get this straight. You're gonna go fight a dragon and rescue a princess just so Farquaad will give you back a swamp which you only don't have because he filled it full of freaks in the first place. Is that about right? SHREK You know, maybe there's a good reason donkeys shouldn't talk. DONKEY I don't get it. Why don't you just pull some of that ogre stuff on him? Throttle him, lay siege to his fortress, grinds his bones to make your bread, the whole ogre trip. SHREK Oh, I know what. Maybe I could have decapitated an entire village and put their heads on a pike, gotten a knife, cut open their spleen and drink their fluids. Does that sound good to you? DONKEY Uh, no, not really, no. SHREK For your information, there's a lot more to ogres than people think. DONKEY Example? SHREK Example? Okay, um, ogres are like onions. (he holds out his onion) DONKEY (sniffs the onion) They stink? SHREK Yes - - No! DONKEY They make you cry? SHREK No! DONKEY You leave them in the sun, they get all brown, start sproutin' little white hairs. SHREK No! Layers! Onions have layers. Ogres have layers! Onions have layers. You get it? We both have layers. (he heaves a sigh and then walks off) DONKEY (trailing after Shrek) Oh, you both have layers. Oh. {Sniffs} You know, not everybody likes onions. Cake! Everybody loves cakes! Cakes have layers. SHREK I don't care... what everyone likes. Ogres are not like cakes. DONKEY You know what else everybody likes? Parfaits. Have you ever met a person, you say, "Let's get some parfait," they say, "Hell no, I don't like no parfait"? Parfaits are delicious. SHREK No! You dense, irritating, miniature beast of burden! Ogres are like onions! And of story. Bye-bye. See ya later. DONKEY Parfaits may be the most delicious thing on the whole damn planet. SHREK You know, I think I preferred your humming. DONKEY Do you have a tissue or something? I'm making a mess. Just the word parfait make me start slobbering. They head off. There is a montage of their journey. Walking through a field at sunset. Sleeping beneath a bright moon. Shrek trying to put the campfire out the next day and having a bit of a problem, so Donkey pees on the fire to put it out. DRAGON'S KEEP Shrek and Donkey are walking up to the keep that's supposed to house Princess Fiona. It appears to look like a giant volcano. DONKEY (sniffs) Ohh! Shrek! Did you do that? You gotta warn somebody before you just crack one off. My mouth was open and everything. SHREK Believe me, Donkey, if it was me, you'd be dead. (sniffs) It's brimstone. We must be getting close. DONKEY Yeah, right, brimstone. Don't be talking about it's the brimstone. I know what I smell. It wasn't no brimstone. It didn't come off no stone neither. They climb up the side of the volcano/keep and look down. There is a small piece of rock right in the center and that is where the castle is. It is surrounded by boiling lava. It looks very foreboding. SHREK Sure, it's big enough, but look at the location. (laughs...then the laugh turns into a groan) DONKEY Uh, Shrek? Uh, remember when you said ogres have layers? SHREK Oh, aye. DONKEY Well, I have a bit of a confession to make. Donkeys don't have layers. We wear our fear right out there on our sleeves. SHREK Wait a second. Donkeys don't have sleeves. DONKEY You know what I mean. SHREK You can't tell me you're afraid of heights. DONKEY No, I'm just a little uncomfortable about being on a rickety bridge over a boiling like of lava! SHREK Come on, Donkey. I'm right here beside ya, okay? For emotional support., we'll just tackle this thing together one little baby step at a time. DONKEY Really? SHREK Really, really. DONKEY Okay, that makes me feel so much better. SHREK Just keep moving. And don't look down. DONKEY Okay, don't look down. Don't look down. Don't look down. Keep on moving. Don't look down. (he steps through a rotting board and ends up looking straight down into the lava) Shrek! I'm lookin' down! Oh, God, I can't do this! Just let me off, please! SHREK But you're already halfway. DONKEY But I know that half is safe! SHREK Okay, fine. I don't have time for this. You go back. DONKEY Shrek, no! Wait! SHREK Just, Donkey - - Let's have a dance then, shall me? (bounces and sways the bridge) DONKEY Don't do that! SHREK Oh, I'm sorry. Do what? Oh, this? (bounces the bridge again) DONKEY Yes, that! SHREK Yes? Yes, do it. Okay. (continues to bounce and sway as he backs Donkey across the bridge) DONKEY No, Shrek! No! Stop it! SHREK You said do it! I'm doin' it. DONKEY I'm gonna die. I'm gonna die. Shrek, I'm gonna die. (steps onto solid ground) Oh! SHREK That'll do, Donkey. That'll do. (walks towards the castle) DONKEY Cool. So where is this fire-breathing pain-in-the-neck anyway? SHREK Inside, waiting for us to rescue her. (chuckles) DONKEY I was talkin' about the dragon, Shrek. INSIDE THE CASTLE DONKEY You afraid? SHREK No. DONKEY But... SHREK Shh. DONKEY Oh, good. Me neither. (sees a skeleton and gasps) 'Cause there's nothin' wrong with bein' afraid. Fear's a sensible response to an unfamiliar situation. Unfamiliar dangerous situation, I might add. With a dragon that breathes fire and eats knights and breathes fire, it sure doesn't mean you're a coward if you're a little scared. I sure as heck ain't no coward. I know that. SHREK Donkey, two things, okay? Shut ... up. Now go over there and see if you can find any stairs. DONKEY Stairs? I thought we was lookin' for the princess. SHREK (putting on a helmet) The princess will be up the stairs in the highest room in the tallest tower. DONKEY What makes you think she'll be there? SHREK I read it in a book once. (walks off) DONKEY Cool. You handle the dragon. I'll handle the stairs. I'll find those stairs. I'll whip their butt too. Those stairs won't know which way they're goin'. (walks off) EMPTY ROOM Donkey is still talking to himself as he looks around the room. DONKEY I'm gonna take drastic steps. Kick it to the curb. Don't mess with me. I'm the stair master. I've mastered the stairs. I wish I had a step right here. I'd step all over it. ELSEWHERE Shrek spots a light in the tallest tower window. SHREK Well, at least we know where the princess is, but where's the... DONKEY (os) Dragon! Donkey gasps and takes off running as the dragon roars again. Shrek manages to grab Donkey out of the way just as the dragon breathes fire. SHREK Donkey, look out! (he manages to get a hold of the dragons tail and holds on) Got ya! The dragon gets irritated at this and flicks it's tail and Shrek goes flying through the air and crashes through the roof of the tallest tower. Fiona wakes up with a jerk and looks at him lying on the floor. DONKEY Oh! Aah! Aah! Donkey get cornered as the Dragon knocks away all but a small part of the bridge he's on. DONKEY No. Oh, no, No! (the dragon roars) Oh, what large teeth you have. (the dragon growls) I mean white, sparkling teeth. I know you probably hear this all time from your food, but you must bleach, 'cause that is one dazzling smile you got there. Do I detect a hint of minty freshness? And you know what else? You're - - You're a girl dragon! Oh, sure! I mean, of course you're a girl dragon. You're just reeking of feminine beauty. (the dragon begins fluttering her eyes at him) What's the matter with you? You got something in your eye? Ohh. Oh. Oh. Man, I'd really love to stay, but you know, I'm, uh...(the dragon blows a smoke ring in the shape of a heart right at him, and he coughs) I'm an asthmatic, and I don't know if it'd work out if you're gonna blow smoke rings. Shrek! (the dragon picks him up with her teeth and carries him off) No! Shrek! Shrek! Shrek! FIONA'S ROOM Shrek groans as he gets up off the floor. His back is to Fiona so she straightens her dress and lays back down on the bed. She then quickly reaches over and gets the bouquet of flowers off the side table. She then lays back down and appears to be asleep. Shrek turns and goes over to her. He looks down at Fiona for a moment and she puckers her lips. Shrek takes her by the shoulders and shakes her away. FIONA Oh! Oh! SHREK Wake up! FIONA What? SHREK Are you Princess Fiona? FIONA I am, awaiting a knight so bold as to rescue me. SHREK Oh, that's nice. Now let's go! FIONA But wait, Sir Knight. This be-ith our first meeting. Should it not be a wonderful, romantic moment? SHREK Yeah, sorry, lady. There's no time. FIONA Hey, wait. What are you doing? You should sweep me off my feet out yonder window and down a rope onto your valiant steed. SHREK You've had a lot of time to plan this, haven't you? FIONA (smiles) Mm-hmm. Shrek breaks the lock on her door and pulls her out and down the hallway. FIONA But we have to savor this moment! You could recite an epic poem for me. A ballad? A sonnet! A limerick? Or something! SHREK I don't think so. FIONA Can I at least know the name of my champion? SHREK Uh, Shrek. FIONA Sir Shrek. (clears throat and holds out a handkerchief) I pray that you take this favor as a token of my gratitude. SHREK Thanks! Suddenly they hear the dragon roar. FIONA (surprised)You didn't slay the dragon? SHREK It's on my to-do list. Now come on! (takes off running and drags Fiona behind him.) FIONA But this isn't right! You were meant to charge in, sword drawn, banner flying. That's what all the other knights did. SHREK Yeah, right before they burst into flame. FIONA That's not the point. (Shrek suddenly stops and she runs into him.) Oh! (Shrek ignores her and heads for a wooden door off to the side.) Wait. Where are you going? The exit's over there. SHREK Well, I have to save my ass. FIONA What kind of knight are you? SHREK One of a kind. (opens the door into the throne room) DONKEY (os) Slow down. Slow down, baby, please. I believe it's healthy to get to know someone over a long period of time. Just call me old-fashioned. (laughs worriedly) (we see him up close and from a distance as Shrek sneaks into the room) I don't want to rush into a physical relationship. I'm not emotionally ready for a commitment of, uh, this - - Magnitude really is the word I'm looking for. Magnitude- - Hey, that is unwanted physical contact. Hey, what are you doing? Okay, okay. Let's just back up a little and take this one step at a time. We really should get to know each other first as friends or pen pals. I'm on the road a lot, but I just love receiving cards - - I'd really love to stay, but - - Don't do that! That's my tail! That's my personal tail. You're gonna tear it off. I don't give permission - - What are you gonna do with that? Hey, now. No way. No! No! No, no! No. No, no, no. No! Oh! Shrek grabs a chain that's connected to the chandelier and swings toward the dragon. He misses and he swings back again. He looks up and spots that the chandelier is right above the dragons head. He pulls on the chain and it releases and he falls down and bumps Donkey out of the way right as the dragon is about to kiss him. Instead the dragon kisses Shreks' butt. She opens her eyes and roars. Shrek lets go of the chain and the chandelier falls onto her head, but it's too big and it goes over her head and forms a sort of collar for her. She roars again and Shrek and Donkey take off running. Very 'Matrix' style. Shrek grabs Donkey and then grabs Princess Fiona as he runs past her. DONKEY Hi, Princess! FIONA It talks! SHREK Yeah, it's getting him to shut up that's the trick. They all start screaming as the dragon gains on them. Shrek spots a descending slide and jumps on. But unfortunately there is a crack in the stone and it hits Shrek right in the groin. His eyes cross and as he reaches the bottom of the slide he stumbles off and walks lightly. SHREK Oh! Shrek gets them close to the exit and sets down Donkey and Fiona. SHREK Okay, you two, heard for the exit! I'll take care of the dragon. Shrek grabs a sword and heads back toward the interior of the castle. He throws the sword down in between several overlapping chain links. The chain links are attached to the chandelier that is still around the dragons neck. SHREK (echoing) Run! They all take off running for the exit with the dragon in hot pursuit. They make it to the bridge and head across. The dragons breathes fire and the bridge begins to burn. They all hang on for dear life as the ropes holding the bridge up collapse. They are swung to the other side. As they hang upside down they look in horror as the dragon makes to fly over the boiling lava to get them. But suddenly the chandelier with the chain jerk the dragon back and she's unable to get to them. Our gang climbs quickly to safety as the dragon looks angry and then gives a sad whimper as she watches Donkey walk away. FIONA (sliding down the 'volcano' hill) You did it! You rescued me! You're amazing. (behind her Donkey falls down the hill) You're - - You're wonderful. You're... (turns and sees Shrek fall down the hill and bump into Donkey) a little unorthodox I'll admit. But thy deed is great, and thy heart is pure. I am eternally in your debt. (Donkey clears his throat.) And where would a brave knight be without his noble steed? DONKEY I hope you heard that. She called me a noble steed. She think I'm a steed. FIONA The battle is won. You may remove your helmet, good Sir Knight. SHREK Uh, no. FIONA Why not? SHREK I have helmet hair. FIONA Please. I would'st look upon the face of my rescuer. SHREK No, no, you wouldn't - - 'st. FIONA But how will you kiss me? SHREK What? (to Donkey) That wasn't in the job description. DONKEY Maybe it's a perk. FIONA No, it's destiny. Oh, you must know how it goes. A princess locked in a tower and beset by a dragon is rescued by a brave knight, and then they share true love's first kiss. DONKEY Hmm? With Shrek? You think- - Wait. Wait. You think that Shrek is you true love? FIONA Well, yes. Both Donkey and Shrek burst out laughing. DONKEY You think Shrek is your true love! FIONA What is so funny? SHREK Let's just say I'm not your type, okay?Fiona: Of course, you are. You're my rescuer. Now - - Now remove your helmet. SHREK Look. I really don't think this is a good idea. FIONA Just take off the helmet. SHREK I'm not going to. FIONA Take it off. SHREK No! FIONA Now! SHREK Okay! Easy. As you command. Your Highness. (takes off his helmet) FIONA You- - You're a- - an ogre. SHREK Oh, you were expecting Prince Charming. FIONA Well, yes, actually. Oh, no. This is all wrong. You're not supposed to be an ogre. SHREK Princess, I was sent to rescue you by Lord Farquaad, okay? He is the one who wants to marry you. FIONA Then why didn't he come rescue me? SHREK Good question. You should ask him that when we get there. FIONA But I have to be rescued by my true love, not by some ogre and his- - his pet. DONKEY Well, so much for noble steed. SHREK You're not making my job any easier. FIONA I'm sorry, but your job is not my problem. You can tell Lord Farquaad that if he wants to rescue me properly, I'll be waiting for him right here. SHREK Hey! I'm no one's messenger boy, all right? (ominous) I'm a delivery boy. (he swiftly picks her up and swings her over his shoulder like she was a sack of potatoes) FIONA You wouldn't dare. Put me down! SHREK Ya comin', Donkey? DONKEY I'm right behind ya. FIONA Put me down, or you will suffer the consequences! This is not dignified! Put me down! WOODS A little time has passed and Fiona has calmed down. She just hangs there limply while Shrek carries her. DONKEY Okay, so here's another question. Say there's a woman that digs you, right, but you don't really like her that way. How do you let her down real easy so her feelings aren't hurt, but you don't get burned to a crisp and eaten? FIONA You just tell her she's not your true love. Everyone knows what happens when you find your...(Shrek drops her on the ground) Hey! The sooner we get to DuLoc the better. DONKEY You're gonna love it there, Princess. It's beautiful! FIONA And what of my groom-to-be? Lord Farquaad? What's he like? SHREK Let me put it this way, Princess. Men of Farquaad's stature are in short supply. (he and Donkey laugh) Shrek then proceeds to splash water onto his face to wash off the dust and grime. DONKEY I don't know. There are those who think little of him. (they laugh again) Fiona: Stop it. Stop it, both of you. You're just jealous you can never measure up to a great ruler like Lord Farquaad. SHREK Yeah, well, maybe you're right, Princess. But I'll let you do the "measuring" when you see him tomorrow. FIONA (looks at the setting sun) Tomorrow? It'll take that long? Shouldn't we stop to make camp? SHREK No, that'll take longer. We can keep going. FIONA But there's robbers in the woods. DONKEY Whoa! Time out, Shrek! Camp is starting to sound good. SHREK Hey, come on. I'm scarier than anything we're going to see in this forest. FIONA I need to find somewhere to camp now! Both Donkey and Shrek's ears lower as they shrink away from her. MOUNTAIN CLIFF Shrek has found a cave that appears to be in good order. He shoves a stone boulder out of the way to reveal the cave. SHREK Hey! Over here. DONKEY Shrek, we can do better than that. I don't think this is fit for a princess. FIONA No, no, it's perfect. It just needs a few homey touches. SHREK Homey touches? Like what? (he hears a tearing noise and looks over at Fiona who has torn the bark off of a tree.) FIONA A door? Well, gentlemen, I bid thee good night. (goes into the cave and puts the bark door up behind her) DONKEY You want me to read you a bedtime story? I will. FIONA (os) I said good night! Shrek looks at Donkey for a second and then goes to move the boulder back in front of the entrance to the cave with Fiona still inside. DONKEY Shrek, What are you doing? SHREK (laughs) I just- - You know - - Oh, come on. I was just kidding. LATER THAT NIGHT Shrek and Donkey are sitting around a campfire. They are staring up into the sky as Shrek points out certain star constellations to Donkey. SHREK And, uh, that one, that's Throwback, the only ogre to ever spit over three wheat fields. DONKEY Right. Yeah. Hey, can you tell my future from these stars? SHREK The stars don't tell the future, Donkey. They tell stories. Look, there's Bloodnut, the Flatulent. You can guess what he's famous for. DONKEY I know you're making this up. SHREK No, look. There he is, and there's the group of hunters running away from his stench. DONKEY That ain't nothin' but a bunch of little dots. SHREK You know, Donkey, sometimes things are more than they appear. Hmm? Forget it. DONKEY (heaves a big sigh) Hey, Shrek, what we gonna do when we get our swamp anyway? SHREK Our swamp? DONKEY You know, when we're through rescuing the princess. SHREK We? Donkey, there's no "we". There's no "our". There's just me and my swamp. The first thing I'm gonna do is build a ten-foot wall around my land. DONKEY You cut me deep, Shrek. You cut me real deep just now. You know what I think? I think this whole wall thing is just a way to keep somebody out. SHREK No, do ya think? DONKEY Are you hidin' something? SHREK Never mind, Donkey. DONKEY Oh, this is another one of those onion things, isn't it? SHREK No, this is one of those drop-it and leave-it alone things. DONKEY Why don't you want to talk about it? SHREK Why do you want to talk about it? DONKEY Why are you blocking? SHREK I'm not blocking. DONKEY Oh, yes, you are. SHREK Donkey, I'm warning you. DONKEY Who you trying to keep out? SHREK Everyone! Okay? DONKEY (pause) Oh, now we're gettin' somewhere. (grins) At this point Fiona pulls the 'door' away from the entrance to the cave and peaks out. Neither of the guys see her. SHREK Oh! For the love of Pete! (gets up and walks over to the edge of the cliff and sits down) DONKEY What's your problem? What you got against the whole world anyway? SHREK Look, I'm not the one with the problem, okay? It's the world that seems to have a problem with me. People take one look at me and go. "Aah! Help! Run! A big, stupid, ugly ogre!" They judge me before they even know me. That's why I'm better off alone. DONKEY You know what? When we met, I didn't think you was just a big, stupid, ugly ogre. SHREK Yeah, I know. DONKEY So, uh, are there any donkeys up there? SHREK Well, there's, um, Gabby, the Small and Annoying. DONKEY Okay, okay, I see it now. The big shiny one, right there. That one there? Fiona puts the door back. SHREK That's the moon. DONKEY Oh, okay. DuLoc - Farquaad's Bedroom The camera pans over a lot of wedding stuff. Soft music plays in the background. Farquaad is in bed, watching as the Magic Mirror shows him Princess Fiona. FARQUAAD Again, show me again. Mirror, mirror, show her to me. Show me the princess. MIRROR Hmph. The Mirror rewinds and begins to play again from the beginning. FARQUAAD Ah. Perfect. Farquaad looks down at his bare chest and pulls the sheet up to cover himself as though Fiona could see him as he gazes sheepishly at her image in the mirror. MORNING Fiona walks out of the cave. She glances at Shrek and Donkey who are still sleeping. She wanders off into the woods and comes across a blue bird. She begins to sing. The bird sings along with her. She hits higher and higher notes and the bird struggles to keep up with her. Suddenly the pressure of the note is too big and the bird explodes. Fiona looks a little sheepish, but she eyes the eggs that the bird left behind. Time lapse, Fiona is now cooking the eggs for breakfast. Shrek and Donkey are still sleeping. Shrek wakes up and looks at Fiona. Donkey's talking in his sleep. DONKEY (quietly) Mmm, yeah, you know I like it like that. Come on, baby. I said I like it. SHREK Donkey, wake up. (shakes him) DONKEY Huh? What? SHREK Wake up. DONKEY What? (stretches and yawns) FIONA Good morning. Hm, how do you like your eggs? DONKEY Oh, good morning, Princess! Fiona gets up and sets the eggs down in front of them. SHREK What's all this about? FIONA You know, we kind of got off to a bad start yesterday. I wanted to make it up to you. I mean, after all, you did rescue me. SHREK Uh, thanks. Donkey sniffs the eggs and licks his lips. FIONA Well, eat up. We've got a big day ahead of us. (walks off) LATER They are once again on their way. They are walking through the forest. Shrek belches. DONKEY Shrek! SHREK What? It's a compliment. Better out than in, I always say. (laughs) DONKEY Well, it's no way to behave in front of a princess. Fiona belches FIONA Thanks. DONKEY She's as nasty as you are. SHREK (chuckles) You know, you're not exactly what I expected. FIONA Well, maybe you shouldn't judge people before you get to know them. She smiles and then continues walking, singing softly. Suddenly from out of nowhere, a man swings down and swoops Fiona up into a tree. ROBIN HOOD La liberte! Hey! SHREK Princess! FIONA (to Robin Hood) What are you doing? ROBIN HOOD Be still, mon cherie, for I am you savior! And I am rescuing you from this green...(kisses up her arm while Fiona pulls back in disgust)...beast. SHREK Hey! That's my princess! Go find you own! ROBIN HOOD Please, monster! Can't you see I'm a little busy here? FIONA (getting fed up) Look, pal, I don't know who you think you are! ROBIN HOOD Oh! Of course! Oh, how rude. Please let me introduce myself. Oh, Merry Men. (laughs) Suddenly an accordion begins to play and the Merry men pop out from the bushes. They begin to sing Robin's theme song. MERRY MEN Ta, dah, dah, dah, whoo. ROBIN HOOD I steal from the rich and give to the needy. MERRY MEN He takes a wee percentage, ROBIN HOOD But I'm not greedy. I rescue pretty damsels, man, I'm good. MERRY MEN What a guy, Monsieur Hood. ROBIN HOOD Break it down. I like an honest fight and a saucy little maid... MERRY MEN What he's basically saying is he likes to get... ROBIN HOOD Paid. So...When an ogre in the bush grabs a lady by the tush. That's bad. MERRY MEN That's bad. ROBIN HOOD When a beauty's with a beast it makes me awfully mad. MERRY MEN He's mad, he's really, really mad. ROBIN HOOD I'll take my blade and ram it through your heart, keep your eyes on me, boys 'cause I'm about to start... There is a grunt as Fiona swings down from the tree limb and knocks Robin Hood unconscious. FIONA Man, that was annoying! Shrek looks at her in admiration. MERRY MAN Oh, you little- - (shoots an arrow at Fiona but she ducks out of the way) The arrow flies toward Donkey who jumps into Shrek's arms to get out of the way. The arrow proceeds to just bounce off a tree. Another fight sequence begins and Fiona gives a karate yell and then proceeds to beat the crap out of the Merry Men. There is a very interesting 'Matrix' moment here when Fiona pauses in mid-air to fix her hair. Finally all of the Merry Men are down, and Fiona begins walking away. FIONA Uh, shall we? SHREK Hold the phone. (drops Donkey and begins walking after Fiona) Oh! Whoa, whoa, whoa. Hold on now. Where did that come from? FIONA What? SHREK That! Back there. That was amazing! Where did you learn that? FIONA Well...(laughs) when one lives alone, uh, one has to learn these things in case there's a...(gasps and points) there's an arrow in your butt! SHREK What? (turns and looks) Oh, would you look at that? (he goes to pull it out but flinches because it's tender) FIONA Oh, no. This is all my fault. I'm so sorry. DONKEY (walking up) Why? What's wrong? FIONA Shrek's hurt. DONKEY Shrek's hurt. Shrek's hurt? Oh, no, Shrek's gonna die. SHREK Donkey, I'm okay. DONKEY You can't do this to me, Shrek. I'm too young for you to die. Keep you legs elevated. Turn your head and cough. Does anyone know the Heimlich? FIONA Donkey! Calm down. If you want to help Shrek, run into the woods and find me a blue flower with red thorns. DONKEY Blue flower, red thorns. Okay, I'm on it. Blue flower, red thorns. Don't die Shrek. If you see a long tunnel, stay away from the light! SHREK & FIONA Donkey! DONKEY Oh, yeah. Right. Blue flower, red thorns. (runs off) SHREK What are the flowers for? FIONA (like it's obvious) For getting rid of Donkey. SHREK Ah. FIONA Now you hold still, and I'll yank this thing out. (gives the arrow a little pull) SHREK (jumps away) Ow! Hey! Easy with the yankin'. As they continue to talk Fiona keeps going after the arrow and Shrek keeps dodging her hands. FIONA I'm sorry, but it has to come out. SHREK No, it's tender. FIONA Now, hold on. SHREK What you're doing is the opposite of help. FIONA Don't move. SHREK Look, time out. FIONA Would you...(grunts as Shrek puts his hand over her face to stop her from getting at the arrow) Okay. What do you propose we do? ELSEWHERE Donkey is still looking for the special flower. DONKEY Blue flower, red thorns. Blue flower, red thorns. Blue flower, red thorns. This would be so much easier if I wasn't color-blind! Blue flower, red thorns. SHREK (os) Ow! DONKEY Hold on, Shrek! I'm comin'! (rips a flower off a nearby bush that just happens to be a blue flower with red thorns) THE FOREST PATH SHREK Ow! Not good. FIONA Okay. Okay. I can nearly see the head. (Shrek grunts as she pulls) It's just about... SHREK Ow! Ohh! (he jerks and manages to fall over with Fiona on top of him) DONKEY Ahem. SHREK (throwing Fiona off of him) Nothing happend. We were just, uh - - DONKEY Look, if you wanted to be alone, all you had to do was ask. Okay? SHREK Oh, come on! That's the last thing on my mind. The princess here was just- - (Fiona pulls the arrow out) Ugh! (he turns to look at Fiona who holds up the arrow with a smile) Ow! DONKEY Hey, what's that? (nervous chuckle) That's...is that blood? Donkey faints. Shrek walks over and picks him up as they continue on their way. There is a montage of scenes as the group heads back to DuLoc. Shrek crawling up to the top of a tree to make it fall over a small brook so that Fiona won't get wet. Shrek then gets up as Donkey is just about to cross the tree and the tree swings back into it's upright position and Donkey flies off. Shrek swatting and a bunch of flies and mosquitoes. Fiona grabs a nearby spiderweb that's on a tree branch and runs through the field swinging it around to catch the bugs. She then hands it to Shrek who begins eating like it's a treat. As he walks off she licks her fingers. Shrek catching a toad and blowing it up like a balloon and presenting it to Fiona. Fiona catching a snake, blowing it up, fashioning it into a balloon animal and presenting it to Shrek. The group arriving at a windmill that is near DuLoc. WINDMILL SHREK There it is, Princess. Your future awaits you. FIONA That's DuLoc? DONKEY Yeah, I know. You know, Shrek thinks Lord Farquaad's compensating for something, which I think means he has a really...(Shrek steps on his hoof) Ow! SHREK Um, I, uh- - I guess we better move on. FIONA Sure. But, Shrek? I'm - - I'm worried about Donkey. SHREK What? FIONA I mean, look at him. He doesn't look so good. DONKEY What are you talking about? I'm fine. FIONA (kneels to look him in the eyes) That's what they always say, and then next thing you know, you're on your back. (pause) Dead. SHREK You know, she's right. You look awful. Do you want to sit down? FIONA Uh, you know, I'll make you some tea. DONKEY I didn't want to say nothin', but I got this twinge in my neck, and when I turn my head like this, look, (turns his neck in a very sharp way until his head is completely sideways) Ow! See? SHREK Who's hungry? I'll find us some dinner. FIONA I'll get the firewood. DONKEY Hey, where you goin'? Oh, man, I can't feel my toes! (looks down and yelps) I don't have any toes! I think I need a hug. SUNSET Shrek has built a fire and is cooking the rest of dinner while Fiona eats. FIONA Mmm. This is good. This is really good. What is this? SHREK Uh, weed rat. Rotisserie style. FIONA No kidding. Well, this is delicious. SHREK Well, they're also great in stews. Now, I don't mean to brag, but I make a mean weed rat stew. (chuckles) Fiona looks at DuLoc and sighs. FIONA I guess I'll be dining a little differently tomorrow night. SHREK Maybe you can come visit me in the swamp sometime. I'll cook all kind of stuff for you. Swamp toad soup, fish eye tartare - - you name it. FIONA (smiles) I'd like that. They smiles at each other. SHREK Um, Princess? FIONA Yes, Shrek? SHREK I, um, I was wondering...are you...(sighs) Are you gonna eat that? DONKEY (chuckles) Man, isn't this romantic? Just look at that sunset. FIONA (jumps up) Sunset? Oh, no! I mean, it's late. I-It's very late. SHREK What? DONKEY Wait a minute. I see what's goin' on here. You're afraid of the dark, aren't you? FIONA Yes! Yes, that's it. I'm terrified. You know, I'd better go inside. DONKEY Don't feel bad, Princess. I used to be afraid of the dark, too, until - - Hey, no, wait. I'm still afraid of the dark. Shrek sighs FIONA Good night. SHREK Good night. Fiona goes inside the windmill and closes the door. Donkey looks at Shrek with a new eye. DONKEY Ohh! Now I really see what's goin' on here. SHREK Oh, what are you talkin' about? DONKEY I don't even wanna hear it. Look, I'm an animal, and I got instincts. And I know you two were diggin' on each other. I could feel it. SHREK You're crazy. I'm just bringing her back to Farquaad. DONKEY Oh, come on, Shrek. Wake up and smell the pheromones. Just go on in and tell her how you feel. SHREK I- - There's nothing to tell. Besides, even if I did tell her that, well, you know - - and I'm not sayin' I do 'cause I don't - - she's a princess, and I'm - - DONKEY An ogre? SHREK Yeah. An ogre. DONKEY Hey, where you goin'? SHREK To get... move firewood. (sighs) Donkey looks over at the large pile of firewood there already is. TIME LAPSE Donkey opens the door to the Windmill and walks in. Fiona is nowhere to be seen. DONKEY Princess? Princess Fiona? Princess, where are you? Princess? Fiona looks at Donkey from the shadows, but we can't see her. DONKEY It's very spooky in here. I ain't playing no games. Suddenly Fiona falls from the railing. She gets up only she doesn't look like herself. She looks like an ogre and Donkey starts freaking out. DONKEY Aah! FIONA Oh, no! DONKEY No, help! FIONA Shh! DONKEY Shrek! Shrek! Shrek! FIONA No, it's okay. It's okay. DONKEY What did you do with the princess? FIONA Donkey, I'm the princess. DONKEY Aah! FIONA It's me, in this body. DONKEY Oh, my God! You ate the princess. (to her stomach) Can you hear me? FIONA Donkey! DONKEY (still aimed at her stomach) Listen, keep breathing! I'll get you out of there! FIONA No! DONKEY Shrek! Shrek! Shrek! FIONA Shh. DONKEY Shrek! FIONA This is me. Donkey looks into her eyes as she pets his muzzle, and he quiets down. DONKEY Princess? What happened to you? You're, uh, uh, uh, different. FIONA I'm ugly, okay? DONKEY Well, yeah! Was it something you ate? 'Cause I told Shrek those rats was a bad idea. You are what you eat, I said. Now - - FIONA No. I - - I've been this way as long as I can remember. DONKEY What do you mean? Look, I ain't never seen you like this before. FIONA It only happens when sun goes down. "By night one way, by day another. This shall be the norm... until you find true love's first kiss... and then take love's true form." DONKEY Ah, that's beautiful. I didn't know you wrote poetry. FIONA It's a spell. (sigh) When I was a little girl, a witch cast a spell on me. Every night I become this. This horrible, ugly beast! I was placed in a tower to await the day my true love would rescue me. That's why I have to marry Lord Farquaad tomorrow before the sun sets and he sees me like this. (begins to cry) DONKEY All right, all right. Calm down. Look, it's not that bad. You're not that ugly. Well, I ain't gonna lie. You are ugly. But you only look like this at night. Shrek's ugly 24-7. FIONA But Donkey, I'm a princess, and this is not how a princess is meant to look. DONKEY Princess, how 'bout if you don't marry Farquaad? FIONA I have to. Only my true love's kiss can break the spell. DONKEY But, you know, um, you're kind of an orge, and Shrek - - well, you got a lot in common. FIONA Shrek? OUTSIDE Shrek is walking towards the windmill with a sunflower in his hand. SHREK (to himself) Princess, I - - Uh, how's it going, first of all? Good? Um, good for me too. I'm okay. I saw this flower and thought of you because it's pretty and - - well, I don't really like it, but I thought you might like it 'cause you're pretty. But I like you anyway. I'd - - uh, uh...(sighs) I'm in trouble. Okay, here we go. He walks up to the door and pauses outside when he hears Donkey and Fiona talking. FIONA (os) I can't just marry whoever I want. Take a good look at me, Donkey. I mean, really, who can ever love a beast so hideous and ugly? "Princess" and "ugly" don't go together. That's why I can't stay here with Shrek. Shrek steps back in shock. FIONA (os) My only chance to live happily ever after is to marry my true love. Shrek heaves a deep sigh. He throws the flower down and walks away. INSIDE FIONA Don't you see, Donkey? That's just how it has to be. It's the only way to break the spell. DONKEY You at least gotta tell Shrek the truth. FIONA No! You can't breathe a word. No one must ever know. DONKEY What's the point of being able to talk if you gotta keep secrets? FIONA Promise you won't tell. Promise! DONKEY All right, all right. I won't tell him. But you should. (goes outside) I just know before this is over, I'm gonna need a whole lot of serious therapy. Look at my eye twitchin'. Fiona comes out the door and watches him walk away. She looks down and spots the sunflower. She picks it up before going back inside the windmill. MORNING Donkey is asleep. Shrek is nowhere to be seen. Fiona is still awake. She is plucking petals from the sunflower. FIONA I tell him, I tell him not. I tell him, I tell him not. I tell him. (she quickly runs to the door and goes outside) Shrek! Shrek, there's something I want...(she looks and sees the rising sun, and as the sun crests the sky she turns back into a human.) Just as she looks back at the sun she sees Shrek stomping towards her. FIONA Shrek. Are you all right? SHREK Perfect! Never been better. FIONA I - - I don't - - There's something I have to tell you. SHREK You don't have to tell me anything, Princess. I heard enough last night. FIONA You heard what I said? SHREK Every word. FIONA I thought you'd understand. SHREK Oh, I understand. Like you said, "Who could love a hideous, ugly beast?" FIONA But I thought that wouldn't matter to you. SHREK Yeah? Well, it does. (Fiona looks at him in shock. He looks past her and spots a group approaching.) Ah, right on time. Princess, I've brought you a little something. Farquaad has arrived with a group of his men. He looks very regal sitting up on his horse. You would never guess that he's only like 3 feet tall. Donkey wakes up with a yawn as the soldiers march by. DONKEY What'd I miss? What'd I miss? (spots the soldiers) (muffled) Who said that? Couldn't have been the donkey. FARQUAAD Princess Fiona. SHREK As promised. Now hand it over. FARQUAAD Very well, ogre. (holds out a piece of paper) The deed to your swamp, cleared out, as agreed. Take it and go before I change my mind. (Shrek takes the paper) Forgive me, Princess, for startling you, but you startled me, for I have never seen such a radiant beauty before. I'm Lord Farquaad. FIONA Lord Farquaad? Oh, no, no. (Farquaad snaps his fingers) Forgive me, my lord, for I was just saying a short... (Watches as Farquaad is lifted off his horse and set down in front of her. He comes to her waist.) farewell. FARQUAAD Oh, that is so sweet. You don't have to waste good manners on the ogre. It's not like it has feelings. FIONA No, you're right. It doesn't. Donkey watches this exchange with a curious look on his face. FARQUAAD Princess Fiona, beautiful, fair, flawless Fiona. I ask your hand in marriage. Will you be the perfect bride for the perfect groom? FIONA Lord Farquaad, I accept. Nothing would make - - FARQUAAD (interrupting) Excellent! I'll start the plans, for tomorrow we wed! FIONA No! I mean, uh, why wait? Let's get married today before the sun sets. FARQUAAD Oh, anxious, are you? You're right. The sooner, the better. There's so much to do! There's the caterer, the cake, the band, the guest list. Captain, round up some guests! (a guard puts Fiona on the back of his horse) FIONA Fare-thee-well, ogre. Farquaad's whole party begins to head back to DuLoc. Donkey watches them go. DONKEY Shrek, what are you doing? You're letting her get away. SHREK Yeah? So what? DONKEY Shrek, there's something about her you don't know. Look, I talked to her last night, She's - - SHREK I know you talked to her last night. You're great pals, aren't ya? Now, if you two are such good friends, why don't you follow her home? DONKEY Shrek, I - - I wanna go with you. SHREK I told you, didn't I? You're not coming home with me. I live alone! My swamp! Me! Nobody else! Understand? Nobody! Especially useless, pathetic, annoying, talking donkeys! DONKEY But I thought - - SHREK Yeah. You know what? You thought wrong! (stomps off) DONKEY Shrek. Montage of different scenes. Shrek arriving back home. Fiona being fitted for the wedding dress. Donkey at a stream running into the dragon. Shrek cleaning up his house. Fiona eating dinner alone. Shrek eating dinner alone. SHREK'S HOME Shrek is eating dinner when he hears a sound outside. He goes outside to investigate. SHREK Donkey? (Donkey ignores him and continues with what he's doing.) What are you doing? DONKEY I would think, of all people, you would recognize a wall when you see one. SHREK Well, yeah. But the wall's supposed to go around my swamp, not through it. DONKEY It is around your half. See that's your half, and this is my half. SHREK Oh! Your half. Hmm. DONKEY Yes, my half. I helped rescue the princess. I did half the work. I get half the booty. Now hand me that big old rock, the one that looks like your head. SHREK Back off! DONKEY No, you back off. SHREK This is my swamp! DONKEY Our swamp. SHREK (grabs the tree branch Donkey is working with) Let go, Donkey! DONKEY You let go. SHREK Stubborn jackass! DONKEY Smelly ogre. SHREK Fine! (drops the tree branch and walks away) DONKEY Hey, hey, come back here. I'm not through with you yet. SHREK Well, I'm through with you. DONKEY Uh-uh. You know, with you it's always, "Me, me, me!" Well, guess what! Now it's my turn! So you just shut up and pay attention! You are mean to me. You insult me and you don't appreciate anything that I do! You're always pushing me around or pushing me away. SHREK Oh, yeah? Well, if I treated you so bad, how come you came back? DONKEY Because that's what friends do! They forgive each other! SHREK Oh, yeah. You're right, Donkey. I forgive you... for stabbin' me in the back! (goes into the outhouse and slams the door) DONKEY Ohh! You're so wrapped up in layers, onion boy, you're afraid of your own feelings. SHREK (os) Go away! DONKEY There you are , doing it again just like you did to Fiona. All she ever do was like you, maybe even love you. SHREK (os) Love me? She said I was ugly, a hideous creature. I heard the two of you talking. DONKEY She wasn't talkin' about you. She was talkin' about, uh, somebody else. SHREK (opens the door and comes out) She wasn't talking about me? Well, then who was she talking about? DONKEY Uh-uh, no way. I ain't saying anything. You don't wanna listen to me. Right? Right? SHREK Donkey! DONKEY No! SHREK Okay, look. I'm sorry, all right? (sigh) I'm sorry. I guess I am just a big, stupid, ugly ogre. Can you forgive me? DONKEY Hey, that's what friends are for, right? SHREK Right. Friends? DONKEY Friends. SHREK So, um, what did Fiona say about me? DONKEY What are you asking me for? Why don't you just go ask her? SHREK The wedding! We'll never make it in time. DONKEY Ha-ha-ha! Never fear, for where, there's a will, there's a way and I have a way. (whistles) Suddenly the dragon arrives overhead and flies low enough so they can climb on. SHREK Donkey? DONKEY I guess it's just my animal magnetism. They both laugh. SHREK Aw, come here, you. (gives Donkey a noogie) DONKEY All right, all right. Don't get all slobbery. No one likes a kiss ass. All right, hop on and hold on tight. I haven't had a chance to install the seat belts yet. They climb aboard the dragon and she takes off for DuLoc. DULOC - CHURCH Fiona and Farquaad are getting married. The whole town is there. The prompter card guy holds up a card that says 'Revered Silence'. PRIEST People of DuLoc, we gather here today to bear witness to the union.... FIONA (eyeing the setting sun) Um- PRIEST ...of our new king... FIONA Excuse me. Could we just skip ahead to the "I do's"? FARQUAAD (chuckles and then motions to the priest to indulge Fiona) Go on. COURTYARD Some guards are milling around. Suddenly the dragon lands with a boom. The guards all take off running. DONKEY (to Dragon) Go ahead, HAVE SOME FUN. If we need you, I'll whistle. How about that? (she nods and goes after the guards) Shrek, wait, wait! Wait a minute! You wanna do this right, don't you? SHREK (at the Church door) What are you talking about? DONKEY There's a line you gotta wait for. The preacher's gonna say, "Speak now or forever hold your peace." That's when you say, "I object!" SHREK I don't have time for this! DONKEY Hey, wait. What are you doing? Listen to me! Look, you love this woman, don't you? SHREK Yes. DONKEY You wanna hold her? SHREK Yes. DONKEY Please her? SHREK Yes! DONKEY (singing James Brown style) Then you got to, got to try a little tenderness. (normal) The chicks love that romantic crap! SHREK All right! Cut it out. When does this guy say the line? DONKEY We gotta check it out. INSIDE CHURCH As the priest talks we see Donkey's shadow through one of the windows Shrek tosses him up so he can see. PRIEST And so, by the power vested in me... Outside SHREK What do you see? DONKEY The whole town's in there. Inside PRIEST I now pronounce you husband and wife... Outside DONKEY They're at the altar. Inside PRIEST ...king and queen. Outside DONKEY Mother Fletcher! He already said it. SHREK Oh, for the love of Pete! He runs inside without catching Donkey, who hits the ground hard. INSIDE CHURCH SHREK (running toward the alter) I object! FIONA Shrek? The whole congregation gasps as they see Shrek. FARQUAAD Oh, now what does he want? SHREK (to congregation as he reaches the front of the Church) Hi, everyone. Havin' a good time, are ya? I love DuLoc, first of all. Very clean. FIONA What are you doing here? SHREK Really, it's rude enough being alive when no one wants you, but showing up uninvited to a wedding... SHREK Fiona! I need to talk to you. FIONA Oh, now you wanna talk? It's a little late for that, so if you'll excuse me - - SHREK But you can't marry him. FIONA And why not? SHREK Because- - Because he's just marring you so he can be king. FARQUAAD Outrageous! Fiona, don't listen to him. SHREK He's not your true love. FIONA And what do you know about true love? SHREK Well, I - - Uh - - I mean - - FARQUAAD Oh, this is precious. The ogee has fallen in love with the princess! Oh, good Lord. (laughs) The prompter card guy holds up a card that says 'Laugh'. The whole congregation laughs. FARQUAAD An ogre and a princess! FIONA Shrek, is this true? FARQUAAD Who cares? It's preposterous! Fiona, my love, we're but a kiss away from our "happily ever after." Now kiss me! (puckers his lips and leans toward her, but she pulls back.) FIONA (looking at the setting sun) "By night one way, by day another." (to Shrek) I wanted to show you before. She backs up and as the sun sets she changes into her ogre self. She gives Shrek a sheepish smile. SHREK Well, uh, that explains a lot. (Fiona smiles) FARQUAAD Ugh! It's disgusting! Guards! Guards! I order you to get that out of my sight now! Get them! Get them both! The guards run in and separate Fiona and Shrek. Shrek fights them. SHREK No, no! FIONA Shrek! FARQUAAD This hocus-pocus alters nothing. This marriage is binding, and that makes me king! See? See? FIONA No, let go of me! Shrek! SHREK No! FARQUAAD Don't just stand there, you morons. SHREK Get out of my way! Fiona! Arrgh! FARQUAAD I'll make you regret the day we met. I'll see you drawn and quartered! You'll beg for death to save you! FIONA No, Shrek! FARQUAAD (hold a dagger to Fiona's throat) And as for you, my wife... SHREK Fiona! FARQUAAD I'll have you locked back in that tower for the rest of your days! I'm king! Shrek manages to get a hand free and he whistles. FARQUAAD I will have order! I will have perfection! I will have - - (Donkey and the dragon show up and the dragon leans down and eats Farquaad) Aaaah! Aah! DONKEY All right. Nobody move. I got a dragon here, and I'm not afraid to use it. (The dragon roars.) I'm a donkey on the edge! The dragon belches and Farquaad's crown flies out of her mouth and falls to the ground. DONKEY Celebrity marriages. They never last, do they? The congregation cheers. DONKEY Go ahead, Shrek. SHREK Uh, Fiona? FIONA Yes, Shrek? SHREK I - - I love you. FIONA Really? SHREK Really, really. FIONA (smiles) I love you too. Shrek and Fiona kiss. Thelonius takes one of the cards and writes 'Awwww' on the back and then shows it to the congregation. CONGREGATION Aawww! Suddenly the magic of the spell pulls Fiona away. She's lifted up into the air and she hovers there while the magic works around her. WHISPERS "Until you find true love's first kiss and then take love's true form. Take love's true form. Take love's true form." Suddenly Fiona's eyes open wide. She's consumed by the spell and then is slowly lowered to the ground. SHREK (going over to her) Fiona? Fiona. Are you all right? FIONA (standing up, she's still an ogre) Well, yes. But I don't understand. I'm supposed to be beautiful. SHREK But you ARE beautiful. They smile at each other. DONKEY (chuckles) I was hoping this would be a happy ending. Shrek and Fiona kiss...and the kiss fades into... THE SWAMP ...their wedding kiss. Shrek and Fiona are now married. 'I'm a Believer' by Smashmouth is played in the background. Shrek and Fiona break apart and run through the crowd to their awaiting carriage. Which is made of a giant onion. Fiona tosses her bouquet which both Cinderella and Snow White try to catch. But they end up getting into a cat fight and so the dragon catches the bouquet instead. The Gingerbread man has been mended somewhat and now has one leg and walks with a candy cane cane. Shrek and Fiona walk off as the rest of the guests party and Donkey takes over singing the song. GINGERBREAD MAN God bless us, every one. DONKEY (as he's done singing and we fade to black) Oh, that's funny. Oh. Oh. I can't breathe. I can't breathe. THE END
yuzhou42 / Camera Laser CalibrationThis package is used to calculate the translation and rotation matrix between camera and laser coordinate, and then fuse the point cloud with image color.
KumarRobotics / Bluefox2ROS driver for the Matrix Vision mvBlueFOX cameras
StanislavPetrovV / Matrix VisionMatrix Vision (web camera) using Pygame, Numpy
Yucao42 / Moving Object Detection MOD SImply RANSAC find fundamental matrix method is applied to detect moving objects even when camera is under motion. Undistortion can be done in camera set of either fisheye or normal pinhole model.
BigTonyTones / Tonys Onvf RTSP ServerVirtual ONVIF gateway that makes incompatible cameras work with UniFi Protect and other NVRs. Includes a modern web UI with matrix view, auto-boot setup, and efficient resource handling for multiple concurrent streams. Runs on Windows and Tested on Ubuntu 25
Infl1ght / Projection 3d 2dProject (transform) point coordinates from 3D to 2D and unproject them back.
noahrbn / Polarization Grating DesignDesign code and examples for polarization-analyzing metasurface gratings as in Rubin et al., "Matrix Fourier optics enables a compact full-Stokes polarization camera", Science aax1839 (2019).
jankozik / VirtualCameraVirtual camera is created only using opencv and numpy. It simulates a camera where we can control all its parameters, intrinsic and extrinsic to get a better understanding how each component in the camera projection matrix affects the final image of the object captured by the camera.
sakshikakde / Zhang Camera CalibrationPython implementation for Zhang's camera calibration.
srane96 / Visual OdometryPython and OpenCV program to estimate Fundamental and Essential matrix between successive frames to estimate the rotation and the translation of the camera center.
geggo / MVacquireMVacquire provides a Python wrapper for the mvIMPACT Acquire library for image acquisition from MATRIX VISION, including support for GigEVision or USB3Vision cameras