Git Product home page Git Product logo

roboclaw_ros's Introduction

roboclaw_ros

Build Status Codacy Badge

This is the ROS driver for the Roboclaw motor controllers made by Ion Motion Control.

#HELP: I have been busy with another project that is not using robo claw. Message me if you want to become a contributer and help keep this thing alive!

Before you begin

Before you use this package you need to calibrate the velocity PID on the Roboclaw. This will requare the installation of the free software IonMotion (Windows only). You do not need to tune for position just velocity.

From the user manual:

IonMotion includes the option to autotune velocity and or position values. To use these options you should first make sure your encoder and motor are running in the correct direction and that basic PWM control of the motor works as expected. To do this go to the PWM Settings screen in IonMotion. Slide the motor slider up to start moving the motor forward. Check the encoder is increasing in value. If it is not either reverse the motor wires or the encoder wires.

If you are using autotune for Position control you must first set the motors QPPS value. Unlike Velocity autotune the QPPS value will not be automatically measured. This is because most position control systems have a limited range of movement. Once you have manually set the motors QPPS value(eg the maximum speed the motor can run at) you can continue with Position autotuning.

Then just click the autotune button for the motor you want to tune. The autotune function will try to determine the best settings for the motor. In the Velocity settings window it will autotune for velocity. In the Position Settings window you have the option to tune a simple PD position controller, a PID position controller or a cascaded Position/Velocity controller(PIV). The cascaded tune will determine both the velocity and position values for the motor but still requires the QPPS be manually set for the motor before starting. Autotune functions usually return reasonable values but in most cases you will still need to manually adjust them for optimum performance.

Usage

Just clone the repo into your catkin workspace. It contains the ROS package and the motor controller driver. Remmeber to make sure ROS has permisions to use the dev port you give it.

cd <workspace>/src
git clone https://github.com/sonyccd/roboclaw_ros.git
cd <workspace>
catkin_make
source devel/setup.bash
roslaunch roboclaw_ros roboclaw.launch

Parameters

The launch file can be configure at the command line with arguments, by changing the value in the launch file or through the rosparam server.

Parameter Default Definition
dev /dev/ttyACM0 Dev that is the Roboclaw
baud 115200 Baud rate the Roboclaw is configured for
address 128 The address the Roboclaw is set to, 128 is 0x80
max_speed 2.0 Max speed allowed for motors in meters per second
ticks_per_meter 4342.2 The number of encoder ticks per meter of movement
base_width 0.315 Width from one wheel edge to another in meters

Topics

###Subscribed /cmd_vel (geometry_msgs/Twist)
Velocity commands for the mobile base. ###Published /odom (nav_msgs/Odometry)
Odometry output from the mobile base.

#IF SOMETHING IS BROEKN: Please file an issue, it makes it far easier to keep track of what needs to be fixed. It also allows others that might have solved the problem to contribute. If you are confused feel free to email me, I might have overlooked something in my readme.

roboclaw_ros's People

Contributors

kotaweav avatar matwilso avatar

Watchers

James Cloos avatar  avatar

roboclaw_ros's Issues

Driving motors at certain speed (using encoders)

When I tried to use the roboclaw built-in speed setter in the Setup App, the motors made a terrible sound and it didn't work at all. Setting this value from serial also fails: it just sets the speed to full blast, as far as I can tell.

The solution to this is to just use the PWM signal to drive the motors.

If we want to add speed control later, an idea I have is to take in a speed and drive the motors at some PWM speed. We then read the encoder values and if it is turning too fast, we turn down the PWM. If it is too fast, we turn up the PWM.

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.