Giter Site home page Giter Site logo

rosserial-arduino-examples's Introduction

rosserial-arduino-examples

Hardware

Arduino and wiring

I have used Arduino Mega 2560. Also there is firmware for Arduino M0.

Pin 2 (for Arduino M0 - pin 3) was connected to FC-03 digital output. 5V and GND was connected to appropriate inputs of FC-03. The following hardware RC filter was applied for FC-03 digital output:

Hardware RC filter
More details about filter can be found here.

Motor was connected using this circuit: Motor Wiring

Docker Container

For development the following docker container was used. To pull it please run

docker pull shadowrobot/build-tools:xenial-kinetic-ide

If you want to run everything from docker container use the following command

docker run -it --name meetup_demo --privileged -e DISPLAY  -e LOCAL_USER_ID=$(id -u) -v /dev/ttyUSB0:/dev/ttyUSB0 -v /tmp/.X11-unix:/tmp/.X11-unix:rw shadowrobot/build-tools:xenial-kinetic-ide

For Arduino M0 the following command was used

docker run -it --name meetup_demo --privileged -e DISPLAY  -e LOCAL_USER_ID=$(id -u) -v /dev/bus/usb:/dev/bus/usb -v /dev/ttyACM0:/dev/ttyACM0 -v /tmp/.X11-unix:/tmp/.X11-unix:rw shadowrobot/build-tools:xenial-kinetic-ide

Also uninstallation of modemmanager was required on host machine in order to connect and detect USB connection of Arduino M0.

Setup

Workspace installation

Go to ~/workspace/src folder on Docker container. Clone repository

git clone https://github.com/AndriyPt/rosserial-arduino-examples.git

Got to ~/workspace. Install dependencies.

rosdep install --from-paths src --ignore-src --rosdistro kinetic -y

Compile source code

catkin_make

and

source ~/workspace/devel/setup.bash

Install Arduino

Download and extract Arduino IDE in home folder.

Setup ros_serial_arduino

In Arduino's libraries folder run

source ~/workspace/devel/setup.bash
rm -rf ros_lib
rosrun rosserial_arduino make_libraries.py .

More details can be found here.

Robot model preview

In order to check robot's URDF and move it's joint run

roslaunch first_description display.launch gui:=True

Simulation

roslaunch first_launch simulation.launch

Real Hardware

roslaunch first_launch real_robot.launch

Tools

Different tools are available in RQT

rqt

rosserial-arduino-examples's People

Contributors

andriypt avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  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.