Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add minipc protocol 2.0 #66

Merged
merged 13 commits into from
Dec 30, 2023
Merged

Add minipc protocol 2.0 #66

merged 13 commits into from
Dec 30, 2023

Conversation

AzulRadio
Copy link
Member

@AzulRadio AzulRadio commented Nov 19, 2023

Update Minipc - Stm32 uart protocol.

Major feature:

  • support direct float number transmit
  • support varying packet length

Minor changes:

  • add pingpong test example
  • add vanilla sending example
  • add stresstest example (max rate at ~700Hz)
  • add motor example

Note that the communication should always be single-sided. A response should never directly depend on any data in previous packets. Example: send back rel_pitch += 1 is an undefined behavior. (Yes, this is the pingpong test.)

Protocol details:

See document: docs/comm_protocol.md in illini-robomaster/iRM_Vision_2023#16

To test this:

Embedded repo example/minipc/StressTestTypeC.cc with Vision repo Communication/communicator.py
and
Embedded repo example/minipc/PingpongTest.cc with Vision repo Communication/communicator.py
For testing details and config setup see code comments.

Embedded PR: #66
Vision PR: illini-robomaster/iRM_Vision_2023#16

Todo:

  • change autoaim thread in vehicle/steering
  • add typeA example
  • change autoaim example

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why commented out

Copy link
Collaborator

@rickxu2 rickxu2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some tests and LGTM, except minor change needed on the vision repo (waiting for permission to push).

@AzulRadio AzulRadio merged commit fc15c38 into main Dec 30, 2023
1 check passed
@AzulRadio AzulRadio deleted the youhy/minipc_protocol branch December 30, 2023 00:59
Andd54 added a commit that referenced this pull request Feb 11, 2024
Andd54 pushed a commit that referenced this pull request Feb 11, 2024
* Break Send() into Pack() for each message type

* add function headers and helpers for Pack()

* lossless float transmission

* data parse rewrite

* rename autoaim_protocol as minipc_protocol; add more comments.

* add examples

---------

Co-authored-by: Richard Xu <[email protected]>
Andd54 added a commit that referenced this pull request Feb 12, 2024
Andd54 added a commit that referenced this pull request Feb 12, 2024
Andd54 added a commit that referenced this pull request Feb 12, 2024
Andd54 added a commit that referenced this pull request Feb 12, 2024
Andd54 added a commit that referenced this pull request Feb 12, 2024
Andd54 added a commit that referenced this pull request Feb 12, 2024
Andd54 pushed a commit that referenced this pull request Feb 15, 2024
* Break Send() into Pack() for each message type

* add function headers and helpers for Pack()

* lossless float transmission

* data parse rewrite

* rename autoaim_protocol as minipc_protocol; add more comments.

* add examples

---------

Co-authored-by: Richard Xu <[email protected]>
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.

3 participants