Skip to content

Get data from power distribution board #82

@ShaneRozenLevy

Description

@ShaneRozenLevy

Most of our robots have a power distribution board on them, yet we don't have the c++ code to communicate with it. This issue details how we might go about it.

At a high level I propose an implementation that looks something between how we handle imu data and how we communicate with the moteus

  1. Lets rename pi3hat_moteus_interface to something better.
  2. The actual interface for the user to talk to the power dist board should be in the mjbots_hardware_interface
  3. Modify pi3hat_moteus_interface::Data to include data for the power dist board
  4. Write moteus_protocol for the power dist board
  5. Use the power dist board protocol to add to the data in
  6. The pi3hat.cpp should handle the low level communication
  7. This for loop should be modified to check the can bus to determine if the can packet was for a moteus or the power dist board. Down the line if we add more can peripherals we might need to improve this check
  8. Communication between the Pi3Hat thread and behavior thread should happen in the mjbots_hardware_interface::ProcessReply() and mjbots_hardware_interface::SendCommand()

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions