Skip to content

UQRacing/teknic_motor_controller

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Teknic Motor Controller

Table of Contents

  1. Teknic Motor Controller
    1. Requirements
    2. Setup
    3. Utiliztion
    4. Configuration Files Breakdown
    5. Teknic Documentation
    6. Helpful Links
  2. Trash Bot Motor Controller
  3. Teknic Examples
    1. Example GPIO
    2. Example Homing
    3. Example Motion
    4. Example MultiThreaded
    5. Example SingleThreaded
    6. Example StatusAlerts
    7. HelloWorld

This library by jcook3701 is being used for the integration of ros and the sFoundation library used for controlling ClearPath motors.

'Move to' node

The 'move to' node sets up one ClearPath motor, and subscribes to a topic which has the current desired angle. Each loop it moves the motor to the desired angle.

XR_usb driver

Every time you plug in the SC-hub and want to communicate with it over linux, you need to install the XR drivers. I (Tyler) need to add this to the repo. It can be accessed from the link below if you look in ClearPath -> Software -> Linux_software.tar.gz and then follow the READMEs until you find the SC-Hub driver, and run the executable.

https://teknic.com/downloads/

Building, running and testing

Build using catkin build, and then run using

$ rosrun teknic_motor_controller one_motor_move_to

Test using:

$ rostopic pub -1 /cmd_angle std_msgs/Float64  -- <angle>

The angle is in pi radians, so if you put in 1 it goes 180 degrees. It uses the absolute angle, so if you put in -2 after you've put in 1 it goes to the position of 1 revolution backwards by spinning 1.5 revolutions backwards.

jcook3701's Trash Bot Motor Controller

Below are the instructions for the Trash Bot Motor Controller by jcook3701. It may be broken from the port between ros-melodic to ros-noetic.

Requirements

The following files are recommended for installation:

$ sudo apt-get install ros-noetic-teleop-twist-keyboard  

Setup

  1. Create ROS Workspace.
$ mdir -p ~/Documents/ros_workspace/trash_bot_workspace/src  
  1. Move to workspace.
$ cd ~/Documents/ros_workspace/trash_bot_workspace/src  
  1. Clone this repository into newly created Trash Bot Workspace.
$ git clone [email protected]:jcook3701/teknic_motor_controller.git  
  1. Move to the head of the project workspace and build the ROS Teknic Motor Controller.
$ cd .. && catkin_make  

Utilization

  1. Source the environment file from the head of the project workspace.
$ source devel/setup.bash  
  1. Use roslaunch to start the motor controller.
$ roslaunch teknic_motor_controller trash_bot_motor_controller.launch  

Configuration Files Breakdown

Note: The following assumptions are being made when using this motor controller.

  1. Each motor is driving two wheels. Each wheel has its own chain that connects it to either the left or the right motor.
  2. Motor orientation is the following:
  (L)  (R)  
---[]  []---  
  1. There are exactly four wheels. This could be modified in the future with an additional parameter to the vehicle configuration file.

Vehicle Parameters:

  1. Number of Motors
    • Description: Number of motors being used on vehicle. It is assumed that this number will be even with a minimum of two motors.
  2. Gear Ratio
    • Description: Gear ratio between motor and single tire rotation.
  3. Wheel Base:
    • Description: The length of the wheel base in meters.
  4. Wheel Radius:
    • Description: The length of the wheel radius in meters.
  5. Tire Deflection
    • Description: Deformation of tire at the point of contact
  6. Diameter Mod
    • Description:

Teknic Motor Parameters:

  1. Encoder Resolution
    • Description: Encoder tics per wheel revolution
  2. Max Motor Velocity
    • Description: Max velocity that the motor may reach during operations.
  3. Max Motor Acceleration
    • Description: Max acceleration that the motor may reach when ramping to the specified velocity.
  4. Max Motor Torque Percentage
    • Description: Max percentage of available torque that the motor may use when operating.

Teknic Documentation

Clearpath SC User Manual
Description: This goes over the general setup and configuration of ClearPath Motors.

S-Foundation Reference
Description: This goes over the ClearPath SDK.

Helpful Links

Differential Drive Kinematics
Control of Mobile Robots- 2.2 Differential Drive Robots
Kinematics of a 4 wheeled differential drive robots
rosbot kernel headers

About

ROS Interface for Teknic ClearPath Motors

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 78.3%
  • C 21.3%
  • Other 0.4%