Closed Bill-Haoyu-Lin closed 8 months ago
Reading Course Material for this. Papers and setup on jetson nano
Put together Path following/path planning with localization. passing only speed in vector form to C board based on the function below. https://github.com/Bill-Haoyu-Lin/CV_Interface/blob/main/CvCmdApi.py
def CvCmd_Heartbeat(self, gimbal_coordinate_x, gimbal_coordinate_y, chassis_speed_x, chassis_speed_y):
# CV positive directions: +x is to the right, +y is upwards
# Remote controller positive directions: +x is upwards, +y is to the left
gimbal_coordinate_x, gimbal_coordinate_y = gimbal_coordinate_y, gimbal_coordinate_x
chassis_speed_x, chassis_speed_y = chassis_speed_y, chassis_speed_x
chassis_speed_y = -chassis_speed_x
# Tx
if self.AutoAimSwitch or self.AutoMoveSwitch:
self.txCvCmdMsg[self.DATA_PAYLOAD_INDEX:self.DATA_PAYLOAD_INDEX+12] = b''.join([gimbal_coordinate_x.to_bytes(2, 'little'), gimbal_coordinate_y.to_bytes(2, 'little'), struct.pack('<f', chassis_speed_x), struct.pack('<f', chassis_speed_y)])
self.ser.write(self.txCvCmdMsg)
# Rx
self.CvCmd_RxHeartbeat()
return (self.AutoAimSwitch, self.AutoMoveSwitch, self.EnemySwitch)
will use imu for main control for path following and camera for secondary control
Localization and mapping for Sentry to move around