Table of Contents

ROS

A working installation of ROS must be installed, before building and running this package. Install ROS http://wiki.ros.org/indigo/Installation/Ubuntu Then set up the ROS environment http://wiki.ros.org/ROS/Tutorials/InstallingandConfiguringROSEnvironment

Install pyseek

The library to use the camera must be downloaded. It is recommended to place it in the catkin_ws folder.

$ git clone https://github.com/adrobinoga/pyseek.git

In order to use this lib you must append the path to this lib to PYTHONPATH, you may do this appending the next line at the end of your .bashrc file

export PYTHONPATH="${PYTHONPATH}:/path/of/your/download/pyseek"

You need install pyUSB with

pip install pyusb

And also install scipy as a requirement

sudo apt-get install python-scipy 

Finally, you must have image-transport-plugins and image-view for your ROS distribution. Usually, you already have it. You can check with the apt-cache search command. **Note: The path of export and source (on the next step) must be complete. You can get the full path with pwd command.

Setup seek-cam package

Use the following commands to get and build the ROS node. It is recommended to place it in the catkin_ws folder.:

$ git clone https://gitlab.com/arcoslab/ros_seek_cam.git
$ cd ros_seek_cam/

If you are using the catkin_ws folder, use catkin_make in catkin_ws folder. If not, use catkin_make inside ros_seek_cam. Then append the following command to .bashrc file:

source /<full>/<path>/devel/setup.bash

To access the camera you need to create a new file /etc/udev/rules.d/50-usb-perms.rules With the line:

SUBSYSTEM=="usb", ATTR{idVendor}=="<vendor id>", ATTR{idProduct}=="<product id>", MODE="0666"

Where the vendor id and the product id, can be obtained with the dmesg command after connecting the seek camera. The last camara used on the humanoid robot had 289d as idVendor and 0010 as idProduct. Then restart the udev service (if you are using a docker container you can skip this step, because udev doesn't support containers) :

$ sudo service udev restart

Run

Now from the same terminal where we source the setup.bash We may run the launch file view_seek.launch to see the camera's output

$ roslaunch seek_cam view_seek.launch

Debug

When running with the roslaunch program it is hard to find errors in the setup. You may perform the roslaunch tasks manually. First, launch roscore:

$ roscore

Then in another terminal, launch the main node:

$ rosrun seek_cam seek_cam_node.py

Open another terminal and run the following command to visualize thermal images with the image_view package:

$ rosrun image_view image_view image:=/thermalview _image_transport:=compressed

API Reference

Topic

The node publishes png images in /thermalview/compressed topic.

Change Image Rotation

To change rotation angle of the published image, you may change the angle argument, when using roslaunch:

$ roslaunch seek_cam view_seek.launch angle:=<camera angle>

When no value is given, the default value set in launch file is used. Where the camera angle is set according to the position of the usb port of the camera,the “0” position is considered to be the position at which the usb port is at 90 degrees if the usb port is rotated 90 degrees counterclockwise from this position, a value of 90 is needed. The camera angle parameter can also be passed with a rosrun instruction:

$ rosrun seek_cam seek_cam_node.py angle=90

When no value is given the default value set in seek_cam_node.py is used.

Author

Alexander Marin Drobinoga alexanderm2230@gmail.com