Git Product home page Git Product logo

simplebgc-ros-diver's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.