Skip to content

HoEmpire/SimpleBGC-ROS-Diver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimpleBGC ROS Diver

Content

Introduction

A motor serial communication driver for a three-axis stabilizing platform using SimpleBGC serial protocol.

Prerequisite

  • ros-melodic-desktop
  • ros-melodic-serial

Usage

1. Build

  1. Build a workspace
mkdir -p ws/src
  1. Clone this repository in /ws/src
cd ws/src
git clone https://github.com/HoEmpire/pointcloud-fusion.git
  1. Build the files
catkin_make
  1. Run the node
source devel/setup.zsh
roslaunch platform_driver platform_driver

2. Config

We can modify the parameters in/pointcloud_fusion/cfg/pointcloud_fusion.yaml

pointcloud_fusion.yaml

basic:
  debug_output_scan: false # output  the current yaw when scanning
  debug_output_encoder: false # output the encoder reading result  in real-time
  init_time: 10 #platform initialization time
  cycle_time_second: 0.05 #the serial communication time
  reset_speed: 5.0 # the time for reset from scan/track to free status
  transient_time: 1.0 # transient time between SCAN/TRACK to FREE
  pitch_in_yaw_control: 0.0 # the pitch offset in yaw control mode

track:
  track_speed_limit: 500.0 #the maximum speed in tracking deg/s (the  actual performance is slower)

3. command message

You can use rostopic pub /write platform_driver/command to control the platform

3.1 Explanation of the control command

uint8 command
// command list
byte POWER_ON = 0
byte POWER_OFF = 1

byte ANGLE_CONTROL = 2 // both speed and angle should be provided
byte SPEED_CONTROL = 3 // only speed should be provided

byte ENCODER_CALIBRATI0N = 4 // calibrate the offset of the encoder
byte RELATIVE_YAW_CONTROL = 5 //control the relative yaw

//only used in angle_control mode and speed_control mode
float32 roll_angle
float32 pitch_angle
float32 yaw_angle
float32 roll_speed
float32 pitch_speed
float32 yaw_speed

// Free Status: mode = 0  (command list only works in FREE status)
// Scan Status: mode = 1
// Track Status: mode = 2 (currently track mode is the relative yaw control mode , the track yaw is the relative yaw angle in platform frame)
uint8 mode

// (in mode =1)
// scan_range(in degree): the yaw will scan from -scan_range to scan_range in platform frame (e.g. scan_range =  90.0, then the platform will scan the yaw angle from -90° to 90°
//scan_cycle_time ( in second): the time for the platform to complete a  cycle (in case of scan_range =  90.0, the yaw angle  0->90°->-90°->0° is a cycle)
float32 scan_range
float32 scan_cycle_time

// (in mode =2) relative yaw angle in platform frame
float32 track_yaw

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published