Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pylipp/ros_temp_laser
Small hobby Arduino/ROS project
https://github.com/pylipp/ros_temp_laser
arduino command-line linux platformio ros vim
Last synced: about 20 hours ago
JSON representation
Small hobby Arduino/ROS project
- Host: GitHub
- URL: https://github.com/pylipp/ros_temp_laser
- Owner: pylipp
- Created: 2017-07-06T18:51:52.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-02T00:45:58.000Z (over 7 years ago)
- Last Synced: 2024-12-09T04:07:04.738Z (about 2 months ago)
- Topics: arduino, command-line, linux, platformio, ros, vim
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Small hobby Arduino/ROS project. Mainly for keeping references of how to setup the development environment (terminal-based: vim, platformio command line tool, ROS)
## Hardware
- Arduino Nano Atmega 328
- laser module
- digital temperature module## General references
- [platformio docs](http://docs.platformio.org/en/latest/installation.html)
## Installing platformio and project
Obviously, get latest source from git (was more up-to-date than PyPI)
mkvirtualenv --python=$(which python2) platformio
pip install -e "git+https://github.com/platformio/platformio-core#egg=platformio-core"Prepare serial port reading
sudo usermod -a -G dialout $(echo $USER)
Install udev rules file
wget -qO- https://raw.githubusercontent.com/platformio/platformio-core/develop/scripts/99-platformio-udev.rules | sudo tee /etc/udev/rules.d/99-platformio-udev.rules > /dev/null
Create empty project dir or clone
platformio init -b nanoatmega328 --ide vim
## Vim-related setup procedure
Download `.ycm_extra_conf.py`, see [the docs](http://docs.platformio.org/en/latest/ide/vim.html)
## Workflow
Hack Arduino code and compile
platformio run
Search libraries (example: ROS)
platformio lib search ros
Install desired package
platformio lib install 345
Upload to board
platformio run -t upload #or: make upload
## Installing ROS environment
sudo apt-get install ros-kinetic-desktop-full ros-kinetic-rosserial ros-kinetic-rosserial-arduino
Don't forget to
source /opt/ros/kinetic/setup.zsh
## Run stuff
Plug board to USB port and run serial connection node (OUTSIDE virtualenv)
roslaunch serial.launch --screen
Toggle laser by
rostopic pub /switch_laser std_msgs/Empty "{}" --once
Read temperature by
rostopic echo /temperature