Giter Site home page Giter Site logo

mecanum_bot's Introduction

RAMU (Really Awesome Mobile Unit)

RAMU is a low-cost, wheel encoder-less, holonomic mobile base that is capable of autonomous navigation. RAMU is powered by ROS 2 and Navigation 2 systems. This repository contains some information on RAMU along with ROS 2 packages and launch files to get RAMU up and running.

Click the image below to watch RAMU autonomously navigate in an indoor environment.

Hardware Design

RAMU's chassis is constructed from 20x20 aluminium extrusion members which are connected together with 3D printed joints. The motor, battery, electronics and sensors mounts are also 3D printed. The CAD is open sourced via Onshape and can be accessed here.

Documentation of the build process is found here

BOM

  1. Raspberry Pi 3B
  2. Arduino Uno
  3. DC geared motors 178RPM x4
  4. Motor drivers x2
  5. Mecanum wheels 96mm diameter x4
  6. 2D lidar

Electrical and Wiring

RAMU's four wheels/motors follow the below numbering convention

   ^
   |
w1---w2
|     |
|     |
w3---w4

Each motor is controlled by a motor driver which receives PWM signals from the Arduino which in-turn receives motor velocities from the RPi.

The RPi thus has the Arduino and 2D lidar plugged into its USB ports. These devices must be available on /dev/ttyUSB1 and /dev/ttyUSB0 respectively. A 12V to 5V DC-DC converter steps down the 12V battery voltage and powers the RPi.

TODO Add wiring diagram

Software Setup

Arduino

RAMU's Arduino receives motor velocities in range [0,255] via serial from the RPi which is used to write PWM signals to the connected motors drivers. Expected format for incoming data:

"[w1, w2, w3, w4]"

where w1, w2, w3, w4 are the velocities of the wheels as seen in the arrangement above.

The code to be uploaded to the arduino is located at arduino/MotorDriver.

RPi

RAMU's RPi is running Ubuntu 20.04 Server. The following binaries are installed on the RPi

Other dependencies:

python3 -m pip install pyserial

Setup a ROS 2 workspace as follows

mkdir ~/ws_mecanum_bot/src -p
cd ~/ws_mecanum_bot/src
git clone https://github.com/Yadunund/mecanum_bot.git
git clone https://github.com/Yadunund/ydlidar_ros.git -b X2l-foxy-devel

Install all ROS 2 dependencies

cd ~/ws_mecanum_bot
rosdep install --from-paths src --ignore-src --rosdistro foxy -yr

Next build the workspace

cd ~/ws_mecanum_bot
source /opt/ros/foxy/setup.bash
colcon build --parallel-workers 1

Running stuff and having fun

With the Arduino code uploaded and the RPi setup, we have various launch commands to get RAMU running.

First launch the lidar node

cd ~/ws_mecanum_bot
source install/setup.bash
ros2 launch ydlidar lidar.launch.xml

Next launch the base_controller and TF2 publishers

cd ~/ws_mecanum_bot
source install/setup.bash
ros2 launch mecanum_bot mecanum_bot.launch.xml

RAMU can now be teleoperated by publishing geometry_msgs/Twist messages over /cmd_vel topic. From a second machine with a joystick plugged in,

cd ~/ws_mecanum_bot
source install/setup.bash
ros2 launch mecanum_bot joystick_teleop.launch.xml

To map an environment using Cartographer,

cd ~/ws_mecanum_bot
source install/setup.bash
ros2 launch mecanum_bot_cartographer cartographer.launch.xml

Save the map files into mecanum_bot_navigation2/map/ as map.pgm and map.yaml.

To navigate autonomously,

cd ~/ws_mecanum_bot
source install/setup.bash
ros2 launch mecanum_bot_navigation2 navigation2.launch.xml

mecanum_bot's People

Contributors

yadunund avatar

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.