User Tools

Site Tools


Writing /var/lib/dokuwiki/data/meta/tutorials/ros_seek_cam.meta failed
tutorials:ros_seek_cam

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tutorials:ros_seek_cam [2019/11/20 21:57] lrodriguezptutorials:ros_seek_cam [2022/09/20 00:08] (current) – external edit 127.0.0.1
Line 6: Line 6:
 http://wiki.ros.org/ROS/Tutorials/InstallingandConfiguringROSEnvironment http://wiki.ros.org/ROS/Tutorials/InstallingandConfiguringROSEnvironment
 ====== Install pyseek ====== ====== Install pyseek ======
-The library to use the camera must be downloaded+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   $ 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 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
Line 14: Line 14:
   pip install pyusb   pip install pyusb
 And also install scipy as a requirement And also install scipy as a requirement
-  sudo apt-get install python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose +  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.  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.  **Note: The path of export and source (on the next step) must be complete. You can get the full path with pwd command. 
  
-====== Download and build seek_cam package ====== +====== 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   $ git clone https://gitlab.com/arcoslab/ros_seek_cam.git
   $ cd ros_seek_cam/   $ cd ros_seek_cam/
-  $ catkin_make +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 source setup.bash +Then append the following command to .bashrc file: 
-  source devel/setup.bash +  source /<full>/<path>/devel/setup.bash 
-this last step must be executed from every terminal before using this package+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 ====== ====== Run ======
Line 32: Line 36:
 We may run the launch file view_seek.launch to see the camera's output We may run the launch file view_seek.launch to see the camera's output
   $ roslaunch seek_cam view_seek.launch   $ roslaunch seek_cam view_seek.launch
-We may also use rosrun+====== 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   $ roscore
 +Then in another terminal, launch the main node:
   $ rosrun seek_cam seek_cam_node.py   $ rosrun seek_cam seek_cam_node.py
-and see the published messages with +Open another terminal and run the following command to visualize thermal images with the image_view package: 
-  $ rostopic echo /thermalview/compressed+  $ 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 ===== ===== Author =====
tutorials/ros_seek_cam.1574287053.txt.gz · Last modified: 2022/09/20 00:08 (external edit)