Skip to content

Firmware Controls Architecture Update - #437

Draft
nickwitten wants to merge 3 commits into
mainfrom
dev/nick/new-controls
Draft

nickwitten wants to merge 3 commits into
mainfrom
dev/nick/new-controls

Conversation

@nickwitten

Copy link
Copy Markdown
Contributor

No description provided.

Bump software-communication and controls to the new-controls versions and
update the host side for their API changes:
- Radio bridge parameter formats for the renumbered robot parameters
  (EKF_PROCESS_STD vec3, EKF_MEASUREMENT_STD vec2,
  PHYS_MOTOR_TORQUE_CONSTANT, FB_POS_LINEAR/ANGULAR, FB_WHEEL_VEL,
  FF_WHEEL_CURRENT_LIMIT, FF_WHEEL_SLIP_COMP,
  ERROR_TRACKING_DIVERGENCE_THRESHOLD, VISION_SEED_SAMPLES).
- Drop the controls_enabled.body_vel / wheel_torque bridge parameters:
  wheel torque (current) control is always on in the firmware and the
  packet no longer has the toggle. controls_enabled.wheel_vel remains,
  default true.
- Game state tracker reads the renamed BasicTelemetry pos_est / vel_est.
  The firmware reports vel_est in the robot's local frame, so rotate it by
  the firmware heading to keep firmware_vel global.
- ateam_controls_traj_from_target_pose was renamed
  ateam_controls_traj_from_target_pos (predict.cpp, path planning
  controls_lib_adapters.cpp).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Forward raw (unfiltered) vision detections to the robots instead of the
  vision filter's state: subscribe to /vision_messages, apply team color
  and side per detection, and send each measurement once along with its
  absolute capture time (vision_capture_us_hi/lo) so the firmware's
  buffered EKF can insert it at the right point in its history.
- Add BCM_GLOBAL_ACCEL_OPEN_LOOP / BCM_LOCAL_ACCEL_OPEN_LOOP to
  RobotMotionCommand and map them to the new firmware maneuvers.
- Velocity commands now carry acceleration limits (max_linear_acc /
  max_angular_acc), so send limit_acc_* rather than limit_vel_*.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Talk to robots on the agreed listen port (discovery_port) rather than
  the hello's source port, for compatibility with both the Odin and Nora
  radio modules.
- Reuse an existing connection when a robot sends repeated hellos (e.g.
  several queued during a link outage), so it keeps the same port and the
  connection isn't destroyed while its receive thread may be waiting.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@barulicm

Copy link
Copy Markdown
Contributor

I don't love having to re-implement some of the vision parsing logic in the radio bridge. We'll also need to add filtering for ignored halves.
Maybe we need to split data preprocessing from actual filtering for the vision pipeline and then the radio bridge can pull the cleaned but not yet filtered data.

@nickwitten

Copy link
Copy Markdown
Contributor Author

I don't love having to re-implement some of the vision parsing logic in the radio bridge. We'll also need to add filtering for ignored halves.
Maybe we need to split data preprocessing from actual filtering for the vision pipeline and then the radio bridge can pull the cleaned but not yet filtered data.

Gotcha, that makes sense.

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