Releases: HKUST-Robocon/RDC-Emulator-2020
v1.3.x – Demo Mode
This version mainly introduces Demo Mode.
Demo Mode
As per the Software RDC Manual, you are required to submit a screen-recorded video of their code running the Emulator. One of the requirements is to enable the DEMO option in the run. You can learn more about this new feature here.
Please find time and coordinate your schedule with your groupmates. Test early in case you find any bugs (either with the Emulator or with your program). As a reminder, all Software material is due by Dec. 23, 11:59PM.
Changelog
Features
- Demo mode. See the docs for more info.
Enhancements
- Show poles on image. Previously they weren't drawn on the image. The only limitation is that the poles are flat (2D) and are not rendered as a 3D object, much like the baskets and everything else.
- (v1.3.1) Improved Demo Mode table. Similar events are now collated. You can view their timestamps by hovering over the description.
- (v1.3.1) Added a checklist-esque section to Demo Mode, listing out the requirements for the End Game condition.
Bugfixes
- (v1.3.1) Various bugfixes.
v1.2.x – Multi-Grab / Throwing Mechanism 🎾
This updates introduces Multi-Grab and the Throwing Mechanism, as well as a nice little timer. Some code-breaking changes have been introduced. These are discussed below, along with some steps towards porting your code from v1.1 to v1.2. Your first priority should be fixing these. Please take 3-5 minutes to read through the section below regarding the breaking changes, and another 3-5 minutes to read the changes to the Emulator Docs (relevant links below).
N.B. emulator.h and emulator.c has been updated. Please remember to copy the newest version into your codebase.
Removal of Default Offsets
Some sensors had default offsets; these have now been removed to encourage your team to config components by themselves. As a result, your code may run differently. For your reference, the original offsets are listed below. Any sensor not listed maintains the default offset of (0, 0) and 0.0 rads.
If your team does not rely on these default offsets, then this shouldn't be a problem.
Sensor | ID | Original Position | Original Angle (rads) |
---|---|---|---|
Camera | 5 | (0, -20) | 0.0 |
Magnetic | 6 | (-25, -40) | 0.0 |
Magnetic | 7 | (25, -40) | 0.0 |
Line Tracking | 10 | (-15, -20) | 0.0 |
Line Tracking | 11 | (15, -20) | 0.0 |
Line Tracking | 12 | (0, 15) | 0.0 |
IR | 15 | (0, -40) | 0.0 |
Grabber | 200 | (0, 25) | π |
Placing as a New Command
Originally, placing was done by passing 0 or 8 to the GRAB command. Placing now works differently.
Instead of passing 0/8 to GRAB, you should pass 1-3 or 9-11 to the new PLACE command. So if your team's code were holding a ping-pong (table-tennis) ball and wanted to drop it, instead of calling emwrite(10, 0)
, you would call emwrite(11, 2)
. (This tells the Emulator to "Place (11) a ping-pong ball (2)".)
Remember to update emulator.h and emulator.c!
Changelog
N.B. macOS v1.2.1 is synonymous to Windows/Linux v1.2.0. For simplicity, both of these refer to "the v1.2.1". Don't ask why.
New Features
- Added a timer to the top-right. It displays the time and number of turns taken. The text will turn orange at 2:50 and red at 3:00. For now, the timer will continue running after 3:00. Later versions might stop the simulation when time's up.
- Added multi-grab! Read about it here.
- Added the PLACE command, providing more flexibility on what to place.
- Added the throwing mechanism! Finally ᗒ ͟ʖᗕ. Read about it here.
Bugfixes
- Adjusted the jutting horizontal wall in the middle of the field.
- (v1.2.1) Fixed issue with request output potentially not being returned.
- (v1.2.2) Fixed TM throwing angle bug.
Enhancements / Other Changes
- Removed default offsets. All components are now initialised at (0, 0), the centre of the robot.
- Update the GrabCode request variable to now buffer three ints, one for each grab slot. If a slot is unoccupied, 0 is indicated. A new helper function
emread_grab_code()
has been added for your convenience. - Restricted GRAB command: the Emulator will only emulate this command at most once per turn.
- Overhauled the display info on the right. It now lists all components in two columns, so the width of the window has increased.
- Changed the colour of IR sensors from dark blue (which was slightly hard to see) to light green.
- Added a welcome message to greet you. :)
- (v1.2.1) Window is now maximised.
v1.1.0 – Noise 🎺
This update introduces several new things, most importantly being motor/sensor noise. In the real world, motors and sensors are not perfect and there will inevitably be some disruptions whether it's from the physical hardware side or the abstract software side. Noise comes in various forms, ranging from salt-and-pepper on images to normal-distributed values.
We've also updated the starter code with a new Emulator command. You may update your code if you'd like to use it.
Most objectives on the roadmap have been met, with the exception of the Throwing Mechanism. We'll be releasing this later on in the week. Thanks for your patience.
Changelog
New Features
- Implemented seeding.
- Implemented motor/sensor noise. Motors and sensors now generate some random noise. The noise isn't excessive, but it's there to discourage any hard-coded solutions.
- Added advanced camera configuration. You can now use a new command (
CONFIGCAM
) to configure the camera's height from the ground and angle of depression.
Bugfixes
- Fixed bug where an empty line is pushed to stdin when nothing was requested.
- Emulator now doesn't go into the Running state when no directory was provided.
Enhancements
- Added version number at bottom left, for quick referencing.
v1.0.2
This update fixes a bug with initialising components and features some minor improvements. Note that the app may take longer to start due to changes to the magnetic field.
Remind your teammates to update their version as well.
Bugfixes:
- Added missing components (8-9, 13-14, 16-19). The throwing mechanism (201) is still a WIP so it's currently unavailable.
Improvements:
- Components are hidden when unused (except the wheel motors, which are always drawn as those little black ovals). This should prevent cluttering.
- Improved the magnetic field. The field now follows the shape of the magnetic lines more closely. The quality of the field has also been improved.
If you encounter any bugs or issues, please kindly report them. Thanks!
v1.0.0 – Introducing the Emulator!
This is the first official release of the RDC 2020 Emulator.
To get started, download the appropriate version for your OS below.
Be sure to read the brief guide before starting to code.
Useful Links (same as email, but linking them here for reference):
- Emulator Repository: Here you'll be able to read a brief guide to the Emulator and download starter code. Please read the guide carefully.
- Emulator Releases: Here you can find the latest releases to the RDC Emulator. We'll be making new releases in the future, so be sure to select [Watch] > [Releases Only] on Github.
- SW RDC Manual: This is an extension of the Game Rule specifically meant for software portion of the RDC.
- Emulator Documentation: This page contains more details about the Emulator and touches a bit on the starter code.
Remember to check your WhatsApp and email for any notices.