ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Easy task :-)
you can do it with the following componenets:
Arduinos flashed with Firmata
Raspis with simple python pymata node (https://github.com/MrYsLab/PyMata)
one RPI node reads ADC and publish it to topic.
one RPI node subscribe to topic and writes data to Arduino
export ROS_MASTER_URI=http://notebook:11311
Done.
Advantage of this solution:
you need to program simple nodes with pymata only.
Sample: https://github.com/mockbot/MockBot/blob/master/mockbot/bin/pymata_move_base.py
Enjoy it.
2 | No.2 Revision |
Easy task :-)
you can do it with the following componenets:
Arduinos flashed with Firmata
Raspis with simple python pymata node (https://github.com/MrYsLab/PyMata)
one RPI node reads ADC and publish it to topic.
one RPI node subscribe to topic and writes data to Arduino
export ROS_MASTER_URI=http://notebook:11311
Done.
Advantage of this solution:
you need to program simple nodes with pymata only.
Sample: https://github.com/mockbot/MockBot/blob/master/mockbot/bin/pymata_move_base.pyConnect Potentiometer to ARDUINO 1 or 2 at Pin A1
Connect Servomotor to ARDUINO 1 or 2 Pin D9
Edit sample code for correct USB port
export your ROS_MASTER_URI=http://roscore_ip:11311
https://github.com/mockbot/MockBot/blob/master/demo/rospymata.py
Enjoy it.
Chrimo
3 | No.3 Revision |
Easy task without rosserial :-)
because of a lot of pain with rosserial, I prefer an alternate solution for ROS and ARDUINO.
Arduino + Firmata
PyMata (Python2) or PyMata-AIO(Python3)
you can do it with the following componenets:
Arduinos flashed with Firmata
Raspis with simple python pymata node (https://github.com/MrYsLab/PyMata)
one RPI node reads ADC and publish it to topic.
one RPI node subscribe to topic and writes data to Arduino
export ROS_MASTER_URI=http://notebook:11311
Done.
Advantage of this solution:
you need to program simple nodes with pymata only.
Connect Potentiometer to ARDUINO 1 or 2 at Pin A1
Connect Servomotor to ARDUINO 1 or 2 Pin D9
Edit sample code for correct USB port
export your ROS_MASTER_URI=http://roscore_ip:11311
https://github.com/mockbot/MockBot/blob/master/demo/rospymata.py
Enjoy it.
Chrimo