SocrobOmniSoftware: Difference between revisions

From ISRWiki
Jump to navigation Jump to search
(Created page with "thumb|SocRob OMNI platform == About == This page presents instructions and ROS drivers to use the SocRob OMNI platform. This platform does not contain...")
 
 
(6 intermediate revisions by 2 users not shown)
Line 3: Line 3:
== About ==
== About ==


This page presents instructions and ROS drivers to use the SocRob OMNI platform. This platform does not contain any computer on-board, so everything must be connected to a laptop placed in the robot.
This page presents instructions and ROS drivers to use the SocRob OMNI platform. This platform does not contain any computer on-board, so everything must be connected to a laptop placed in the robot.  


It is considered that the computer has a ROS Fuerte installation.  
=== Hardware ===
 
The robot contains:
* Three omnidirectional wheels, motors (with temperature sensors) and a motor controller that connects to a PC using USB. There is a button on top that enables/disables the motors and can be used in emergencies.
* An omnidirectional camera that connects to a PC using Ethernet.
* A compass.
* An Arduino that connects to a PC using USB. This Arduino is used to interface the compass and temperature sensors.
 
Each robot uses two 12V batteries (be aware of the different plug for charging/discharging), and one more to power the camera alone. Do NOT leave the bateries plugged to the robot after working. Keep a periodic check on the bateries voltage and do NOT use them below 10.5/11V.
 
The electronics of the robot have to be turned on using a switch on the chassis.
 
=== Software ===


The software contains drivers for:
The software contains drivers for:
* motors -- control motors and recieve odometry
* motors -- control motors and receive odometry
* compass -- compass angle and motor temperatures, since both are connected to the same Arduino
* compass -- compass angle and motor temperatures, since both are connected to the same Arduino
* kicker -- control the kicker and recieve charged voltage
<!--* kicker -- control the kicker and receive charged voltage-->


There is a control hierarchy implemented in control_selector.
There is a control hierarchy implemented in control_selector.
Line 48: Line 60:
<code>
<code>
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", OWNER="socrob"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", OWNER="socrob"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0042", OWNER="socrob"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0042", OWNER="socrob"
</code>
</code>
Line 57: Line 70:


Please note:
Please note:
* This software was extensively tested with ROS Fuerte.
* The environment variable MY_ID must be set to the robot number. For example: <code>export MY_ID=2</code>
* The environment variable MY_ID must be set to the robot number. For example: <code>export MY_ID=2</code>
* Ethernet must be configured with the static IP address 172.16.46.80. Camera IP is 172.16.46.8#(robot's number)
* Ethernet must be configured with the static IP address 172.16.46.80. Camera IP is 172.16.46.8#(robot's number)
Line 71: Line 85:
** socrob_display -- Utility to display debug images.
** socrob_display -- Utility to display debug images.


=== Motors Node ===


==== Subscribed Topics ====
== Motors Node ==
 
=== Subscribed Topics ===


* control_input_final -- Final command, fused by control_selector
* control_input_final -- Final command, fused by control_selector
* watchdogs/all_ok -- Final robot status, fused by show_stopper
* watchdogs/all_ok -- Final robot status, fused by show_stopper


==== Published Topics ====
=== Published Topics ===


* odometry -- Odometry
* odometry -- Odometry
* world_info/isRunning -- Button state
* world_info/isRunning -- Button state


=== Compass Node ===
=== Defined in ''src/Libraries/WorldDefinition.hpp'' ===


==== Published Topics ====
* MaximumSpeed -- Maximum speed of the robot
 
 
== Compass Node ==
 
=== Published Topics ===


* compass_angle -- Compass angle in radians
* compass_angle -- Compass angle in radians
* temperature -- Motors temperature for each motor in degrees celsius
* temperature -- Motors temperature for each motor in degrees celsius


=== Kicker Node ===


==== Subscribed Topics ====
<!--
== Kicker Node ==
 
=== Subscribed Topics ===


* world_info/isRunning -- The kicker is only charged if the robot is playing or ready to play
* world_info/isRunning -- The kicker is only charged if the robot is playing or ready to play
* kick -- Kick with intensity from 0 to 100
* kick -- Kick with intensity from 0 to 100
-->
== MJPEG Camera Node ==
=== Published Topics ===
* image_raw -- Image stream from the camera
=== Parameters ===
* filename -- Camera URL or video filename to read (for the OMNI platform cameras use ''http://172.16.46.8#/video.mjpg'')
== SocRob Display ==
Used for debug display by the compass, line_points and driver_view. To use, while the nodes are running type:
<code>
rosrun socrob_display srdisplay
</code>




== Examples ==
== Examples ==


The driver.launch file will launch the OmniManual teleoperation utility along with a transformed view of the camera image, simulation a forward view with rear view mirror.
The driver.launch file will launch the OmniManual teleoperation utility along with a transformed view of the camera image, simulation a forward view with rear view mirror. Pressing ''h'' will show the terminal's commands.


The line_points node is an example of how to process and extract information from images.
The line_points node is an example of how to process and extract information from images.

Latest revision as of 12:41, 13 November 2013

SocRob OMNI platform

About

This page presents instructions and ROS drivers to use the SocRob OMNI platform. This platform does not contain any computer on-board, so everything must be connected to a laptop placed in the robot.

Hardware

The robot contains:

  • Three omnidirectional wheels, motors (with temperature sensors) and a motor controller that connects to a PC using USB. There is a button on top that enables/disables the motors and can be used in emergencies.
  • An omnidirectional camera that connects to a PC using Ethernet.
  • A compass.
  • An Arduino that connects to a PC using USB. This Arduino is used to interface the compass and temperature sensors.

Each robot uses two 12V batteries (be aware of the different plug for charging/discharging), and one more to power the camera alone. Do NOT leave the bateries plugged to the robot after working. Keep a periodic check on the bateries voltage and do NOT use them below 10.5/11V.

The electronics of the robot have to be turned on using a switch on the chassis.

Software

The software contains drivers for:

  • motors -- control motors and receive odometry
  • compass -- compass angle and motor temperatures, since both are connected to the same Arduino

There is a control hierarchy implemented in control_selector.

There are a few watchdogs implemented to stop the robot in extreme situations:

  • camera_watchdog -- stops the robot if no image is received from the camera
  • temperature_watchdog -- stops the robot is motors temperature becomes too high
  • show_stopper -- fuses the information from watchdogs to determine if the robot must be stopped


Software

SocRob ROS Packages

The source code can be found here: SocRob_OMNI_ROS-1.0.tar.xz. This must be decompressed to a directory in the ROS_PACKAGE_PATH.

System Dependencies

Install system dependencies (Boost, libFTDI and curl) with:

sudo apt-get install libboost-all-dev libftdipp-dev libftdipp1 curl

FTDI Access Permissions

You might be able to use USB devices without this, but in some cases you must explicitly give permissions for your user to access FTDI devices over USB.

Create a Udev file as root with:

sudo nano /etc/udev/rules.d/10-socrob.rules

and fill it with

SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", OWNER="socrob"

SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0042", OWNER="socrob"

replacing socrob with your username.


Usage

Please note:

  • This software was extensively tested with ROS Fuerte.
  • The environment variable MY_ID must be set to the robot number. For example: export MY_ID=2
  • Ethernet must be configured with the static IP address 172.16.46.80. Camera IP is 172.16.46.8#(robot's number)
  • When using a launch file, all of the ROS parameters must be initialized. Check driver.launch for an example.
  • When using roscore without a launch file, the script to set the parameters must be run from inside socrob_ros with: sh config/set_params_real.sh

Packages

  • socrob_ros -- All drivers that still depend on the old MeRMaID libraries and some examples.
  • socrob_aux -- Independent ROS packages:
    • mermaid_defines -- Legacy MeRMaID header with some typedefs and defines.
    • mermaid_xml -- Legacy MeRMaID library to process xml files (new ROS projects should use yaml and rosparam).
    • mjpeg_camera -- Network camera driver.
    • socrob_base -- Base headers for SocRob code and Math template library.
    • socrob_display -- Utility to display debug images.


Motors Node

Subscribed Topics

  • control_input_final -- Final command, fused by control_selector
  • watchdogs/all_ok -- Final robot status, fused by show_stopper

Published Topics

  • odometry -- Odometry
  • world_info/isRunning -- Button state

Defined in src/Libraries/WorldDefinition.hpp

  • MaximumSpeed -- Maximum speed of the robot


Compass Node

Published Topics

  • compass_angle -- Compass angle in radians
  • temperature -- Motors temperature for each motor in degrees celsius



MJPEG Camera Node

Published Topics

  • image_raw -- Image stream from the camera

Parameters


SocRob Display

Used for debug display by the compass, line_points and driver_view. To use, while the nodes are running type:

rosrun socrob_display srdisplay


Examples

The driver.launch file will launch the OmniManual teleoperation utility along with a transformed view of the camera image, simulation a forward view with rear view mirror. Pressing h will show the terminal's commands.

The line_points node is an example of how to process and extract information from images.