/notebook/deprecated/ros/12-arduino

Using Arduino with ROS


Introduction

These instructions were for how to create the package from scratch. if you are using the idealab_ros repository you will not have to do all the steps

Instructions

  1. add the arduino to the usb filter list in virtualbox on the host machine
  2. plug in usb device and find out device info, including port

    ```bash dmesg

    dmesg | grep arduino

    ```

  3. boot ubuntu, open terminal (ctrl+t) navigate to /dev, and list devices

    bash cd /dev ls -la

  4. install arduino

    bash sudo apt update sudo apt install -y arduino

  5. clone hx711 library

    bash git clone https://github.com/idealabasu/HX711.git

  6. open arduino

  7. install hx711 library
  8. select port (/ttyACM0)
  9. select programmer (AVRisp mkII)
  10. make new directory in src/

    bash catkin_create_pkg force_plate std_msgs rospy roscpp

  11. edit package as before

    1. add message
    2. catkin_make
    3. commit git
  12. make scripts

    ```bash roscd force_plate/ mkdir scripts cd scripts

    pull talker

    wget https://raw.github.com/ros/ros_tutorials/kinetic-devel/rospy_tutorials/001_talker_listener/talker.py chmod +x talker.py

    wget https://raw.github.com/ros/ros_tutorials/kinetic-devel/rospy_tutorials/001_talker_listener/listener.py

    chmod +x listener.py

    ```

  13. Modify as needed

About

I am an engineer and educator, having spent ten years as a professor. My goal is to help you build your knowledge of design and technology, get your hardware working, and propel your startup or small business. Get in touch!