Skip to content

Releases: Carleton-SRCL/SPOT

SPOT 4.1.0 Pre-Release.3 Hotfix.1

23 Jan 19:55
Compare
Choose a tag to compare
Pre-release

General Information

This is a hotfix for SPOT 4.1.0 Pre-Release.3. This is a very small fix to try and better handle the angle wrapping problems, as well as a regression fix for the simulated control mixer which adds back the thruster saturation calculation.

The software can be downloaded here: SPOT 4.1.0-PR.3 Hotfix.1

Changes

  • Change 1: In the default LQR and PD controllers, the angular error is corrected to eliminate when platforms try to complete a full rotation to reach the same attitude.

  • Change 2: In the previous pre-release version, the saturation block for the thrusters was removed, but this has been added back in to improve the simulations when compared to experiments.

SPOT 4.1.0 Pre-Release.3

28 Dec 02:03
Compare
Choose a tag to compare
Pre-release

Overview

This is a minor software revision, moving from SPOT 4.1.0 Pre-Release.2 to SPOT 4.1.0 Pre-Release.3. This release includes major improvements to the control mixer, simulations, and data handling. A critical bug identified by Jeremy Peters has been resolved. Users on previous pre-releases are recommended to upgrade.

The software can be directly downloaded here (or from the pre-release branch): SPOT 4.1.0-PR.3

Changes

  • Change 1: A check has been added to highlight to users that simulations for the robotic arm will not work as expected at simulation rates below 1000 Hz.
  • Change 2: Data is now moved around the diagram using vectors instead of scalars, greatly decreasing the number of memory store blocks in the template diagram. Kudos to Jeremy Peters for pointing out that memory store blocks can now handle vectors.
  • Change 3: Simulation data is now handled to better reflect reality. Simulation results are downsampled to match the collection rate, and noise is added to the measurements only. There are now two different sources of simulation data: "truth" states and "measured" states, which users can use as they see fit. Truth states represent the states of the platforms without noise or downsampling. Measured states reflect the experimental setup. Path planning and controllers use measured states.
  • Change 4: The control mixer has been reworked to be a quadprog compatible problem. Broadly speaking, this new approach appears to improve the performance of the platforms in most scenarios. However, it increases the compile time by 3 minutes.
  • Change 5: The software suite has been updated to be mostly compatible with Ubuntu 22.04—eventually this will include experiments! If you are a Linux aficionado, you can now do everything from a Linux machine. Note that this has only been tested for Ubuntu 22.04. At the moment, the only thing preventing an experiment from a Linux machine is the StreamData.exe executable was written and compiled for Windows.
  • Change 6: A major bug in the previous control mixer was identified by Jeremy Peters. This bug is no longer present in the diagram given the change to the control mixer. If you do not want to change your software version, the fix is very simple—email me at [email protected].
  • Change 7: Renamed the custom controllers to default LQR for better clarity, and added a description block to describe how to add a custom controller.
  • Change 8: Added a debugger to the GUI that can receive log messages from the active platforms.
  • Change 9: Fixed a backend issue where the thruster force vector was only being created when clicking run simulation or build code. Also, the definition of these constants has been moved to the GUI backend, as they should not be changed by the users.
  • Change 10: Updated the color scheme in the Set Initial States sub-app to match the rest of the GUI.
  • Change 11: Fixed an issue that would prevent processing the ExpLog CSV to a MAT file when a Memory Store Block contains a vector. Now, when there are more CSV columns than there are names in the bus, the code will fallback to generic "UnlabelledData". This way, at least the data is not lost.
  • Change 12: Added the experiment time to the real-time display—but for now it represents the time since StreamData.exe was started, not the time in the Simulink diagram. This will be updated in the next release.
  • Change 13: The plotting tool was simplified slightly after feedback indicated that having multiple plotting panes didn't add much usefulness.
  • Change 14: Fixed a bug where the filter checkbox was not actually filtering the primary dataset (but was working for the secondary dataset).
  • Change 15: The computer vision tab has been completed and is ready for pre-release chaos. At this time, users can start a live stream of the ZED2 camera, save a video recording, or capture a still image. The aim is to add in the ability to synchronize images with a running experiment. There are several known quirks that will be ironed out in PR.4—but they are listed in the Known Issues section with their corresponding workarounds.
  • Change 16: Users can now opt for a dynamic legend in the plotting tool. Simply check the "Include Legend" option and the legend should start appearing.
  • Change 17: Users can now change the docking cone and docking port faces via the GUI. There are only four locations available: +X, -X, +Y, and -Y. The default values for this pre-release correspond to the faces that the cone and dock will be on for the capstone 2024 experiments. Note, the location of the arm is not currently impacted by this setting. Also, there is a known visual artifact for certain faces, but not the ones that matter for now.
  • Change 18: Added a button on the Hardware Control tab that searches the Saved Data folder for any matching sets of RED, BLACK, and BLUE data, and then merges the data into one mergedData class. This means that you do not need to load three different files.
  • Change 19: There has been a change to the StreamData.exe—velocity is now calculated when data is obtained from the ground truth system. This has cleaned up the velocity a fair bit—though different controllers may still require cleaner velocities.

Known Issues

  • Issue 1: The "experiment time" in the GUI does not reflect the true experiment time. It is simply the time since the user started the phase-space cameras.
  • Issue 2: If you open the real-time log, then close it, users will get an error message that the port is in use. The workaround is to restart the GUI.
  • Issue 3: The ability to overlay simulations during an experiment is still too unstable.
  • Issue 4: The first time users start a ZED stream, VLC MIGHT not display the streaming video. When this occurs, this can be resolved by stopping streaming through the GUI and restarting it again.
  • Issue 5: When users stop streaming the ZED camera footage, they must close the running instance of the terminal otherwise new streams cannot be started.
  • Issue 6: There are some animation artifacts that appear when certain conditions are met (usually based on the location of the dock and cones).

SPOT 4.1.0 Pre-Release.2

09 Oct 12:42
Compare
Choose a tag to compare
Pre-release

Overview

This is a minor software revision, moving from SPOT 4.1.0 Pre-Release.1 Hotfix.1 to SPOT 4.1.0 Pre-Release.2. This release is generally a bug and quality of life update, so users can update their diagrams on an as-needed basis.

The software can be downloaded here: SPOT 4.1.0-PR.2

Changes

  • Change 1: Fixed the broken "jump to" animation dial, which would output an error when used.
  • Change 2: Addressed multiple warnings when viewing the GUI code to improve the overall code quality.
  • Change 3: The Carleton logo in the Simulink diagram has been updated to match the GUI.
  • Change 4: Fixed incorrect error messages provided by the GUI.
  • Change 5: Fixed the broken animation speed slider. Animation speed is now based on an upsampled data packet, with a linear function to determine the ideal packet size based on the sample rate.
  • Change 6: Added a new option under Tools for users to enter SSH login information. SSH details are no longer hardcoded in the GUI. All hardcoded instances have been updated.
  • Change 7: Updated all GUI instances that required knowledge of the MATLAB version to work with any version of MATLAB.
  • Change 8: Created a public-facing function allowing users to load GUI states programmatically. Sample code for this is added to Run_Initializer.m.
  • Change 9: Added a checkbox for both Save Simulation Data and Save Experiment Data, allowing users to enter custom file names when saving data. By default, names are automatically generated, but unchecking the box prompts for a custom name.
  • Change 10: Changed how data is saved in simulations so users can append arrays to the data bus, and all data will be saved correctly. Note: This is not yet implemented in experiments.
  • Change 11: Moved the electromagnet GPIO connection to GPIO 482 and confirmed the pin can be triggered via the GUI button. Note: The platform's resistor needs modification before this works.
  • Change 12: Fixed a bug where accelerations for BLACK and BLUE were not filtered the same way as RED.
  • Change 13: Fixed a bug in the PWM mixer for RED, which was using the thruster positions for BLACK. This had a negligible impact since all platforms have similar thruster locations.
  • Change 14: Fixed a bug where animations would hitch when a platform’s attitude crossed a singularity.

SPOT 4.1.0 Pre-Release.1 Hotfix.1

30 Sep 11:59
Compare
Choose a tag to compare
Pre-release

Overview

This is a minor software revision, moving from SPOT 4.1.0 Pre-Release.1 to SPOT 4.1.0 Pre-Release.1 Hotfix.1. This revision is primarily being released now as Change 1 listed below has a significant impact when comparing simulation results to experiment results.

The software can be downloaded here: SPOT 4.1.0-PR.1-Hotfix.1

Detailed Patch Notes

Changes

  • Change 1: The clock from the PhaseSpace, which has been determined to be inconsistent, has been replaced by the internal Simulink clock. The software has been adjusted to ensure the platforms still synchronize correctly. This change has resulted in a significant improvement when comparing experiment results to simulation results.
  • Change 2: A dropdown menu has been added that allows users to change the IP address, name, and password for any platform. In this way, if the IP addresses are changed, the information is not hard-coded into the GUI.
  • Change 3: Alongside the menu option, all hard-coded instances of SSH connection information have been changed in the GUI back-end.
  • Change 4: A menu option to see About information has been added to the File menu—this simply provides information about software licenses, authors, contributors, and the current software version.
  • Change 5: Fixed an issue where the live feed would freeze up after stopping an experiment.
  • Change 6: Fixed an issue where the platforms in live view would not display correctly.
  • Change 7: Enabled the option to show the docking code/dock and solar panels in live view. Overlaying simulation is still in progress.
  • Change 8: Added a checkbox so users can choose when you overplot.
  • Change 9: Fixed issue #75.

SPOT 4.1.0 Pre-Release.1

21 Sep 12:39
Compare
Choose a tag to compare
Pre-release

Overview

This is a major software revision, moving from 4.0.0 to 4.1.0. This version is compatible with MATLAB 2024a and MATLAB 2024b, but was last built for 2024b. This version includes significant improvements to the Simulink diagram logic as well as general improvements and several new features for the graphical user interface. This version also includes new hardware that old versions cannot access, such as the inertial measurement units. See revision notes below for additional details. A major PWM revision is also included, but this is a Python script that runs on the platforms and is thus already available for all versions of the software.

The software can be downloaded here: SPOT 4.1.0-PR.1

Detailed Patch Notes

Initializer Changes

  • Change 1: Added a chunk of code at the end of the initializer to show how to run simulations without using the GUI by directly manipulating the GUI handle. This enables users to run simulations in a loop to facilitate optimization.
  • Change 2: Moved the estimate thruster forces to the end of the initializer as these parameters should never be changed by the user.

GUI Changes

  • Change 1: Added a refresh button next to the Simulink selection dropdown menu, which when clicked will refresh the available diagrams.
  • Change 2: Added a button to remotely control the state of the electromagnet on BLACK. This is still a work in progress and not ready for Pre-Release 1.
  • Change 3: Added a function which automatically checks for the presence of any continuous-time integrators or derivatives in the Simulink diagram. If found, a warning is displayed to users indicating that experiments may not match simulations.
  • Change 4: Removed the thruster count threshold variable from the GUI, as it is not something most users will be editing.
  • Change 5: Added LQR gains to support the new default control law. PID gains are still available if desired (though what is LQR if not a tuned PID).
  • Change 6: Data class labels are now automatically generated based on the name of the input signal to the bus. As a result, the ApplyDataClass function has become obsolete and has been removed.
  • Change 7: The data inspector has been reworked so that each plot can support overplotting. The data inspector figures have been split into sub-tab groups to allow for larger figures.
  • Change 8: Added a toggle to show the simulation result at the same time as an experiment is running so that performance can be compared in-situ. This is still a work in progress and not ready for Pre-Release 1.
  • Change 9: Added a toggle to show and hide the cone and dock from the simulation and the experiment.
  • Change 10: Added a toggle to show and hide the solar panels in simulation and experiment.
  • Change 11: Added a toggle to show and hide the path of the spacecraft (simulation only).
  • Change 12: Updated the real-time visualization so that the experiment time is displayed. This is still a work in progress and not ready for Pre-Release 1.
  • Change 13: Added a button on the direct hardware control tab to SSH into the vision computer.
  • Change 14: Removed the noise options as they generally went unused and GUI space is at a premium. In the next pre-release, noise will be properly added.
  • Change 15: Removed obsolete code from the GUI and moved some components to accommodate new features.
  • Change 16: Starting the PhaseSpace cameras no longer automatically starts the live feed. It is preferable to leave these choices to the user.
  • Change 17: Reworked the animation tool. Users can now select different parts of the spacecraft to animate, including the cone, dock, solar panels, and path traces. Thanks: Courtney.
  • Change 18: Added a public-facing function to execute simulations from a script.
  • Change 19: Added a new Computer Vision tab - for this release, it is disabled. But in the next release, it will contain the ability to capture a live feed from a camera on the RED platform.
  • Change 20: After much testing, it appears that there is still an issue with the data rate when Simulink is running at the same rate as the PhaseSpace system. For the moment, we have reverted back to 20 Hz diagram + 10 Hz data. In Pre-Release 2, we are hoping to collect data using ROS, which may finally resolve this problem.

Simulink Changes

  • Change 1: Removed a leftover termination block located in the Check Connections subsystem.
  • Change 2: Added hardware blocks to support the new BMI160 IMU's which are now installed on each platform. They provide acceleration and gyroscopic measurements.
  • Change 3: Reworked the data saving to use a single bus. This allows the bus inputs to be labeled and these labels can be used to automatically generate names for the data class.
  • Change 4: Significantly reworked the layout of the Simulink template. Guidance and control are now their own subsystems. Control laws and path planners are programmed inside these subsystems, and flags are used in the experiment logic to indicate which control law/path planner should be used during any given segment. This also means that there is only ONE path planner and control law code block, rather than one for each segment of the experiment.
  • Change 5: Made LQR the default control law, but PD is still available.
  • Change 6: Implemented Artificial Potential Field as the default path planner.
  • Change 7: Removed any instances of custom derivative blocks for the simulations.
  • Change 8: Implemented a new control mixer for the thrusters, which uses a heuristic ranking approach to avoid having to eliminate negative PWM values.
  • Change 9: Greatly reduced the number of If-Else blocks, which improves the performance of the simulations.
  • Change 10: Updated the Send Data to TX2 subsystem to support the new Orin vision computer.
  • Change 11: All angles are now wrapped by default. Control laws and path planning have been updated to show how attitude control can be accomplished without unwrapping. This should hopefully set the standard and avoid more confusion.
  • Change 12: Added color to distinguish the different memory store blocks. RED blocks are for the chaser, BLACK blocks are for the target, BLUE blocks are for the obstacle, and GREEN blocks are for the arm.
  • Change 13: Created a duty cycle zero-order hold subsystem for the three platforms in simulation. This block accepts the duty cycle at whatever rate the diagram is executed and then holds the value so that it is only run at 5 Hz. In this way, the simulated behavior should be closer to the experiment.
  • Change 14: After much back and forth with researchers, we settled on a default diagram rate of 20 Hz. This provided the most consistent performances.
  • Change 15: Moving average filters have been added to the PhaseSpace velocity calculations to help clean up the velocity measurement.

Bug Fixes

  • Bug 1: Fixed GitHub issue #53 regarding an incorrect warning message.
  • Bug 2: Updated the default SPOT GUI mat file to correct some errors and ensure compatibility with the new features.
  • Bug 3: Fixed an issue where the arm was showing up in the experiment live preview but not moving around because there is no arm data feedback to the GUI.
  • Bug 4: Fixed a typo in the BLACK pucks loading bar.
  • Bug 5: Fixed an issue where the GUI would freeze when the PhaseSpace executable crashes, requiring the user to hit Ctrl-C in the Command Window.
  • Bug 6: The incorrect labels in the save data section have been corrected.
  • Bug 7: Fixed a typo in the main GUI that would mislabel the nominal forces parameter.
  • Bug 8: Fixed an issue with the PWM code where the pulse timing was dependent on the duty cycle. Thus, as the duty cycle command changes, so would the timing of the next PWM pulse.

Known Issues

  • Bug 1: The Artificial Potential Field code is not currently working well and is not recommended for use. But it is included as an example of how to add a path planner. Hopefully, this can be improved for the next pre-release.
  • Bug 2: There is a possible sequence-break issue where if the user stops an experiment and the live data stream is running, the GUI may freeze.
  • Bug 3: When comparing the IMU angular velocity to the PhaseSpace angular velocity, there appears to be a time-lag of about 0.35 seconds. It is currently unknown how much of an impact this is having or if this latency is real.
  • Bug 4: The Animation Speed slider is currently broken and does not change the speed of the animations. There is also a visual issue where the tick text is cut off.

Planned Features

  • Change 1: Update the connection status LED so that it is dynamic and informs users when the connection has been lost.
  • Change 2: A special Kalman filter is actively being worked on to handle the time lag.
  • Change 3: There is a planned internal competition to develop better velocity estimation methods. The winning algorithm will be permanently added to the software.

SPOT 4.0.0-RC.4-Hotfix.1

02 Feb 03:07
Compare
Choose a tag to compare

This release contains the updated PhaseSpace code and executable for the new LED drivers. There are no other differences between RC.4 and this hotfix.

The software can be downloaded here: SPOT 4.0.0-RC.4-Hotfix.1

SPOT 4.0.0-RC.4

08 Sep 19:20
Compare
Choose a tag to compare

This marks the fourth release candidate of SPOT 4.0.0. THIS UPDATE COMMITS THE CARDINAL SIN OF BREAKING THE COMPATIBILITY OF OLDER RELEASE CANDIDATES, UPDGRADING IS MANDATORY.

Why you ask, am I breaking everything again? Because I'm reverting back to software PWM for now. That doesn't mean hardware PWM is bad, but for our application it's been more trouble then it's worth, and the RC.3 release was premature. See release notes below for more details. My apologies.

The software can be downloaded here: SPOT v4.0.0-RC4

Here are the patch notes for this release:

  • Fixed the ArmConfig.png image so that the body axis orientation is correct.
  • Fixed a bug where if the user saves a GUI state with a diagram selected, when loading the GUI state it will load the diagram (this can lead to problems if you load the state and the diagram is missing or renamed). When loading states, the diagram dropdown should be set to default.
  • Flip-flopped back to software PWM for the following reasons:
  1. Hardware PWM is best for high frequency problems, where the the pulses are extremely fast. Because of the valve time on the thrusters, is does not make sense to have a high frequency PWM.
  2. The minimum hardware PWM achievable on the PCA9685 is 24 Hz. This can work [see Yazan], without a great controller it wastes a lot of air.
  3. This minimum PWM frequency also limits the minimum duty cycle that be commanded. At 24Hz, any duty cycle lower then 16.8% is not achievable (no air will come out). This results in a large dead zone where simple PD controllers struggle.
  • Because of the above, reverted the thruster check code and clean shutdown code to work with GPIO code and not the PCA9685.
  • Created a software PWM Python script that is located on all platforms and in the Resources folder. This script runs as fast as possible when executed, and receives duty cycle commands via local UDP from an active diagram.
  • Created a PWM management script that manages the remote starting and stopping of the PWM Python code.
  • Fixed a bug where the acceleration in X was incorrect for all platforms in simulation (no derivative was being taken).
  • Tweaked the gains and the starting conditions for the default experiment to have better results and smoother behavior.
  • Reverted back to the data rate being 80% of the baseRate - while buffering still seems to be resolved, doing this seems to help when there are network latency problems in the lab.

SPOT 4.0.0-RC.3

05 Sep 11:26
Compare
Choose a tag to compare

This marks the third release candidate of SPOT 4.0.0. THIS UPDATE COMMITS THE CARDINAL SIN OF BREAKING THE COMPATIBILITY OF OLDER RELEASE CANDIDATES, UPDGRADING IS MANDATORY.

The software can be downloaded here: SPOT v4.0.0-RC3

Here are the patch notes for this release:

  • Installed the Adafruit PCA9685 hardware PWM board on all platforms for use with the thrusters. At this time, the minimum PWM frequency is 24 Hz, and control needs to be further tuned - but it is usable. This tuning will occur in the next update which is around the corner (1-2 weeks).
  • Modified the data inspector load data function so that the GUI returns to the focus of the desktop when the user either cancels or loads data.
  • [Courtesy of Kirk Hovell] Found a longstanding bug that likely resulted in about 2% more air being used on average. The issues were: For RED only, the centre of mass offset due to the robot arm is no longer considered when no robot arm is present, and on all platforms the thruster decay due to pressure drop is considered when recalculating the actual achieved thrust (Fx_Sat, Fy_Sat, Tz_Sat). This was done by replacing one of the MakeH blocks with MakeHWithDecay.
  • Found an error in the GUI in the FireBLUEThrusters callback. The "app.CleanShutdown" function was calling the BLACK platform instead of the BLUE one.
  • Updated the CycleAllThrusters function to use I2C and the new hardware PWM.
  • Updated the Cycle GPIOs On/Off button to turn off all PWM channels.
  • Changed the data rate to match the base rate. Confirmed with Yazan that buffering appears to truly be resolved.
  • Found an error in the GUI where if the gpio428 is turned on and improperly turned off, the user can't reset gpio428 (pucks).
  • Updated the gains for the new PWM hardware.
  • [Courtesy of Yazan Chihabi] Fixed a bug where setting the sub-phase #4 time to zero would cause the simulation to fail.

SPOT 4.0.0-RC.2

05 Aug 20:40
Compare
Choose a tag to compare

This marks the second release candidate of SPOT 4.0.0. Changes may still occur, but they should not break compatibility with SPOT 4.0.0-RC.1. Upgrading to this version is likely optional for most users.

The software can be downloaded here: SPOT v4.0.0-RC2

Here are the patch notes for this release:

  • Updated the arm simulation code to allow for different friction coefficients at each joint.
  • Removed unused code from the arm simulation section.
  • Fixed a small typo in a tooltip for the main GUI.
  • Added in a UDP send block in the template Simulink file to send data to the NVIDIA Jetson TX2 board. See corresponding Wiki entry for details.
  • Created a python script called 'receive_data.py' which can be deployed on the Jetson TX2 to receive data.
  • Added some QOL touches and backend bug fixes.
  • Removed the guidance_server code from the custom library because it was broken and no longer needed for communication with the Jetson TX2.

SPOT 4.0.0-RC.1

09 Jul 20:55
Compare
Choose a tag to compare

This marks the release of the latest SPOT software. Changes may still occur, but they should not break compatibility.

The software can be downloaded here: SPOT v4.0.0-RC1

Here are the patch notes for this release (which are the same as the pre-release, but with some additional changes related to the manipulator):

  • The Simulink diagram has been updated for compatibility with the latest NVIDIA Jetson Xavier hardware.
  • The GUI has been completely revamped to support the latest hardware. There are significant changes and even experienced users should refer to the Wiki.

Note that this release contains many more changes, too many to list here. Consider this a fresh start for the software.