Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Serial Logger Documentation

Fraser Dougall edited this page Jan 30, 2022 · 6 revisions

Objective

Parse the packets being sent from the Arduino to the Jetson into human readable statements using the built in ROS logger to display the statements. The raw packets will be logged in hexadecimal form to a file, where it will then be parsed in a .cpp file, then logged via ROS. The output will consist of, depending on packet intention, steer angle, target velocity, cart slowing up or slowing down, execution time, and more.

Requirements

  • Print the packets in human readable form [steer angle, velocity, execution time]
  • Each log is dated from run time
  • Log will measure execution time of the command
  • Output will have different flags such as info, warning, error
  • The math of the CRC will be tracked using overflow addition
  • Look at past packets to see if the cart is changing speed

Structure of a Serial Packet:

Enable Case: (4 bytes): START_BYTE , ID_ENABLE , serial_crc , STOP_BYTE

Disable Case: (4 bytes): START_BYTE , ID_KILL , serial_crc , STOP_BYTE

Control Case: (6 bytes): START_BYTE , ID_CONTROL , data_len_buf , (BRAKE or THROTTLE or STEERING)_buf , serial_crc , STOP_BYTE

Software Architecture:

File location: /ti_comm/src/test/amp_serial_jetson_SERIAL_test.cpp In amp_serial_jetson_build_packet() function Use fprintf

Clone this wiki locally