ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 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.

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.

Example

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

Code

https://github.com/mockbot/MockBot/blob/master/demo/rospymata.py

Enjoy it.

Chrimo

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.

Example

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

Code

https://github.com/mockbot/MockBot/blob/master/demo/rospymata.py

Enjoy it.

Chrimo