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
- add the arduino to the usb filter list in virtualbox on the host machine
-
plug in usb device and find out device info, including port
```bash dmesg
dmesg | grep arduino
```
-
boot ubuntu, open terminal (ctrl+t) navigate to /dev, and list devices
bash cd /dev ls -la -
install arduino
bash sudo apt update sudo apt install -y arduino -
clone hx711 library
bash git clone https://github.com/idealabasu/HX711.git -
open arduino
- install hx711 library
- select port (/ttyACM0)
- select programmer (AVRisp mkII)
-
make new directory in src/
bash catkin_create_pkg force_plate std_msgs rospy roscpp -
edit package as before
- add message
- catkin_make
- commit git
-
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
```
-
Modify as needed