Skip to content

Reorganize software stack#168

Merged
nathanaschbacher merged 125 commits intodevelfrom
maint/reorganize-software-stack
Jul 28, 2017
Merged

Reorganize software stack#168
nathanaschbacher merged 125 commits intodevelfrom
maint/reorganize-software-stack

Conversation

@vertexmachina
Copy link
Copy Markdown
Contributor

No description provided.

vertexmachina and others added 30 commits July 11, 2017 17:25
Prior to this commit, the CAN gateway would receive messages on the OBD
bus and then repackage them into "chassis state" messages, and also
publish heartbeat messages with chassis state information. This commit
removes that overhead by instead having the CAN gateway look for
specific OBD messages on the OBD bus and then republish any that it
receives to the Control CAN bus for further consumption by the modules
without any processing or bundling up into "chassis state" reports.

This allows the gateway to simplify its role by not doing any processing
of OBD messages but instead simply acting as a bridge between the OBD
bus and the control bus, and removes the need for it to keep track of
timeouts and health information as that can be done by the modules
themselves when they look for the specific OBD messages that they care
about.
Prior to this commit, there were exponential filters when reading from
vehicle sensors because there was a lot of noise from the brake
actuator, but now the brake actuator is much less noisy and exponential
filters are unnecessary. This commit removes the exponential filters
from the modules.
Prior to this commit, the throttle module contained logic that is being
moved out of the firmware and will instead be done at a high level on a
PC which communicates with the firmware through an API. This commit
simplifies the firmware so that it is instead solely responsible for
sending out raw values received from above to the DAC, checking for
faults and publishing fault reports, and publishing a (reduced) report.
    Prior to this commit, the steering module contained logic that is being
    moved out of the firmware and will instead be done at a high level on a
    PC which communicates with the firmware through an API. This commit
    simplifies the firmware so that it is instead solely responsible for
    sending out raw values received from above to the DAC, checking for
    faults and publishing fault reports, and publishing a (reduced) report.
Prior to this commit, using cmake to build tests would attempt to locate the signal smoothing library, which has now been removed in the firmware. This commit adjusts the cmake file so that it doesn't try to include that library.
Prior to this, the steering command field for enabling or disabling the steering module was still called 'enabled'. This commit renames it to 'enable' to fit in line with the new naming procedures.
Prior to this commit, the steering DAC min/max values for output weren't constrained enough. This commit constrains them to known values pending further testing.
Prior to this commit, the OSCC interface lived in the joystick commander utility folder. This commit moves it into the common folder of OSCC so it can be utilized as the start of a OSCC API.
Prior to this commit, reports and commands followed a naming structure like oscc_report_brake_s. This commit changes it to read more like namespacing, i.e. oscc_brake_report_s, which fits better with the new code organization and API.
Prior to this commit, the throttle module used timestamps to keep track
of when to check for faults and when timeouts occurred. This commit
replaces the timestamp system with a timer system where faults are
checked ten times a second. For command timeouts, a flag is cleared
every time a command is received and set at the end of the interrupt
service routine - if a command is not received between one ISR call and
the next (a span of 100ms), then the timeout flag has not been cleared
and a timeout is considered to have occurred. For sensor validity
checks, they are run once with every ISR call, meaning they're run every
100ms.
Prior to this commit, the steering module used timestamps to keep track
of when to check for faults and when timeouts occurred. This commit
replaces the timestamp system with a timer system where faults are
checked ten times a second. For command timeouts, a flag is cleared
every time a command is received and set at the end of the interrupt
service routine - if a command is not received between one ISR call and
the next (a span of 100ms), then the timeout flag has not been cleared
and a timeout is considered to have occurred. For sensor validity
checks, they are run once with every ISR call, meaning they're run
every 100ms.
Prior to this commit, the brake module used timestamps to keep track
of when to check for faults and when timeouts occurred. This commit
replaces the timestamp system with a timer system where faults are
checked ten times a second. For command timeouts, a flag is cleared
every time a command is received and set at the end of the interrupt
service routine - if a command is not received between one ISR call and
the next (a span of 100ms), then the timeout flag has not been cleared
and a timeout is considered to have occurred. For sensor validity
checks, they are run once with every ISR call, meaning they're run every
100ms.
Prior to this commit, brake reports were following the old naming style. This commit updates them. This commit also provides a stubbed out API.
Prior to this commit, the brake module contained logic that is being
moved out of the firmware and will instead be done at a high level on a
PC which communicates with the firmware through an API. This commit
simplifies the firmware so that it is instead solely responsible for
actuating solenoids, checking for faults and publishing fault
reports, and publishing a (reduced) report.
Prior to this commit, the CAN Gateway only forwarded three known OBD
frames to the control CAN bus. This commit modifies the gatway to
forward all OBD frames to the control CAN bus for use further up the
stack.
Katie Cleary and others added 26 commits July 27, 2017 21:31
Prior to this commit, the documentation for joystick commander lived in the OSCC README. This commit gives it its own README file in preparation for moving to a different repo. It also updates the OSCC README to reflect the new changes made to the firmware and API.
It also adds some inline comments to the joystick commander example code to further clarify interactions between joystick commander and the OSCC API.
Prior to this commit, the firmware had a concept of what vehicle it was
building for which is no longer in line with the way the software stack
is architected (i.e., firmware should be consistent across vehicles, all
that changes is inside of the vehicle specific header like
"kia_soul.h"). This commit removes the KIA Soul references and keeps the
firmware vehicle agnostic.
Prior to this commit, the timers would interrupt the modules while they
were talking to the hardware which caused sporadic issues. This commit
disable interrupts whenever the firmware is interfacing with a piece of
hardware (CAN, sensors, solenoids, etc).
Prior to this commit, joystick commander existed in the main OSCC repo
which caused versioning problems where joystick commander might need to
be updated but a version bump in the firmware/API was unwanted. This
commit removes joystick commander from the main repo, but it lives on in
its own separate repo.
Prior to this commit, the property based tests were not using the new directory layout. This commit changes them to find files in the right places.
Prior to this commit, builds were failing because the Jenkinsfile was looking for applications that are no longer part of OSCC. This commit updates them.
@nathanaschbacher
Copy link
Copy Markdown
Contributor

+1 nice work.

@nathanaschbacher nathanaschbacher merged commit 1171726 into devel Jul 28, 2017
@vertexmachina vertexmachina deleted the maint/reorganize-software-stack branch July 30, 2017 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants