SocrobOmniSoftware: Difference between revisions
No edit summary |
|||
(3 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
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. | ||
=== 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: |
Latest revision as of 12:41, 13 November 2013
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
- 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:
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.