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

As mig says, the answers depend on your hardware.

Example 1 (my robot): - Raspberry Pi, on the robot, runs ROS. - Arduino-style microcontroller talks to sensors and motors, does not run ROS. - ROS node (ros_arduino_python) listens for /cmd_vel messages, decides motor speeds, and sends over a serial protocol to Arduino. - Arduino sketch (ROSArduinoBridge.ino, source in ros_arduino_bridge package) listens for motor speed commands, controls motors, and sends sensor values over serial protocol to RPi. - ros_arduino_python receives sensor values and publishes as ROS messages.

Example 2 (hypothetical robot): - Robot runs some Linux microcontroller, perhaps Raspberry Pi or Odroid, running ROS. - Fancy motor controller connected to microcontroller using USB connection. - Some sensors connected via I2C to microcontroller. - ROS node on robot listens for /cmd_vel, decides motor speeds, and sends to motor controller. - ROS node on robot talks I2C to sensors and publishes ROS sensor messages.

In both cases the ROS nodes on the robot and ROS on your PC communicate over WiFi, presumably. You could run the ROS master on the robot (that's what I do) or your laptop.

What is your hardware?

As mig says, the answers depend on your hardware.

Example 1 (my robot): - robot):

  • Raspberry Pi, on the robot, runs ROS. - ROS.
  • Arduino-style microcontroller talks to sensors and motors, does not run ROS. - ROS.
  • ROS node (ros_arduino_python) listens for /cmd_vel messages, decides motor speeds, and sends over a serial protocol to Arduino. - Arduino.
  • Arduino sketch (ROSArduinoBridge.ino, source in ros_arduino_bridge package) listens for motor speed commands, controls motors, and sends sensor values over serial protocol to RPi. - RPi.
  • ros_arduino_python receives sensor values and publishes as ROS messages.

Example 2 (hypothetical robot): - robot):

  • Robot runs some Linux microcontroller, perhaps Raspberry Pi or Odroid, running ROS. - ROS.
  • Fancy motor controller connected to microcontroller using USB connection. - connection.
  • Some sensors connected via I2C to microcontroller. - microcontroller.
  • ROS node on robot listens for /cmd_vel, decides motor speeds, and sends to motor controller. - controller.
  • ROS node on robot talks I2C to sensors and publishes ROS sensor messages.

In both cases the ROS nodes on the robot and ROS on your PC communicate over WiFi, presumably. You could run the ROS master on the robot (that's what I do) or your laptop.

What is your hardware?