Started Labbook 2014.
December 13, 2013
- Found a discussion where they used gphoto2 from Matlab with the unix(gphoto2) command.
December 10, 2013
- According to this discussion, no ros-node for ip camera exist, although GsCam has streaming capability.
- There are several ros-packages with different drivers for different cameras. The package Photo makes use of the gPhoto library (although only standard USB cameras were mentioned).
- Tried to install bosch_drivers for groovy, but direct install didn't work. Did a checkout of the source-code with svn in my ~/ROS/groovy-directory., but wasn't recognized as package (and didn't rosmake). Did also a command rosws set photo --svn http://svn.code.sf.net/p/bosch-ros-pkg/code/trunk/stacks/bosch_drivers -y, followed by rosws update groovy/photo and rosdep install photo -yr. This failed on missing package opencv2.
December 9, 2013
- Connected nb-usb to the Theta, and used avahi-discover to see which services are in the network. The WLAN light never became blue, after a while it even went off. Ifconfig showed that nb-ros only received a inet6 address.
- Did a port scan on the Theta (adress 192.168.1.1) with nmap -A 192.168.1.1. Only the http-port (80) seems to be open (although the scan reported 999 closed ports, so I am not sure if really all ports are scanned). No operating system or webserver version are reported. Did a port scan above 1000 with option -p1000-65535, which reveiled one other open port: 15740/tcp open unknown; the default PTP/IP port according to gPhoto documentation.
- Looking at Yasuhiro Fujii page. Was able to grab an image with command env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt --port=ptpip:192.168.1.1 "--camera=PTP/IP Camera" --capture-image, which gave a string of events which had to be killed with Ctrl-C.
- Inspecting the debug output in my-logfile.txt. After connecting to ptip:192.168.1.1 an init_cmd is given, which the Theta responds with:
0000 01 00 00 00 12 34 56 78-90 12 34 56 78 90 12 34 .....4Vx..4Vx..4
0010 56 78 90 12 52 00 49 00-43 00 4f 00 48 00 20 00 Vx..R.I.C.O.H. .
0020 54 00 48 00 45 00 54 00-41 00 00 00 01 00 00 00 T.H.E.T.A.......
which indicate that ptpip is connected!
- Next, the oprequest get as third response
0000 01 00 00 00 6e 00 0d 00-00 00 64 00 01 00 00 00 ....n.....d.....
0010 00 10 00 00 00 01 10 02-10 03 10 04 10 05 10 06 ................
0020 10 07 10 08 10 09 10 0a-10 0b 10 0e 10 14 10 15 ................
0030 10 16 10 22 10 04 00 00-00 02 40 06 40 0a 40 0d ..."......@.@.@.
0040 40 0b 00 00 00 01 50 10-50 11 50 2c 50 06 d0 01 @.....P.P.P,P...
0050 d8 02 d8 03 d8 05 d8 06-d8 07 d8 02 00 00 00 01 ................
0060 30 01 38 02 00 00 00 01-30 01 38 14 52 00 69 00 0.8.....0.8.R.i.
0070 63 00 6f 00 68 00 20 00-43 00 6f 00 6d 00 70 00 c.o.h. .C.o.m.p.
0080 61 00 6e 00 79 00 2c 00-20 00 4c 00 74 00 64 00 a.n.y.,. .L.t.d.
0090 2e 00 00 00 0c 52 00 49-00 43 00 4f 00 48 00 20 .....R.I.C.O.H.
00a0 00 54 00 48 00 45 00 54-00 41 00 00 00 06 30 00 .T.H.E.T.A....0.
00b0 31 00 2e 00 31 00 30 00-00 00 09 30 00 30 00 31 1...1.0....0.0.1
00c0 00 30 00 31 00 31 00 39-00 32 00 00 00 .0.1.1.9.2...
which indicates the serial number (and device version 01.10). The device supports the following operations, events and properties:
0.286585 PTP2/ptp2/library.c(2): 0x1001 (PTP_OC_GetDeviceInfo)
0.286612 PTP2/ptp2/library.c(2): 0x1002 (PTP_OC_OpenSession)
0.286638 PTP2/ptp2/library.c(2): 0x1003 (PTP_OC_CloseSession)
0.286663 PTP2/ptp2/library.c(2): 0x1004 (PTP_OC_GetStorageIDs)
0.286689 PTP2/ptp2/library.c(2): 0x1005 (PTP_OC_GetStorageInfo)
0.286714 PTP2/ptp2/library.c(2): 0x1006 (PTP_OC_GetNumObjects)
0.286739 PTP2/ptp2/library.c(2): 0x1007 (PTP_OC_GetObjectHandles)
0.286765 PTP2/ptp2/library.c(2): 0x1008 (PTP_OC_GetObjectInfo)
0.286790 PTP2/ptp2/library.c(2): 0x1009 (PTP_OC_GetObject)
0.286816 PTP2/ptp2/library.c(2): 0x100a (PTP_OC_GetThumb)
0.286841 PTP2/ptp2/library.c(2): 0x100b (PTP_OC_DeleteObject) - PTP_OC_SendObjectInfo, PTP_OC_SendObject
0.286867 PTP2/ptp2/library.c(2): 0x100e (PTP_OC_InitiateCapture)
0.286896 PTP2/ptp2/library.c(2): 0x1014 (PTP_OC_GetDevicePropDesc) - missing PTP_OC_FormatStore, PTP_OC_ResetDevice, PTP_OC_SelfTest, PTP_OC_SetObjectProtection, PTP_OC_PowerDown
0.286936 PTP2/ptp2/library.c(2): 0x1015 (PTP_OC_GetDevicePropValue)
0.286966 PTP2/ptp2/library.c(2): 0x1016 (PTP_OC_SetDevicePropValue) - followed by several operations: i.e. PTP_OC_InitiateOpenCapture and PTP_OC_TerminateOpenCapture
0.286998 PTP2/ptp2/library.c(2): 0x1022 (PTP_OC_GetResizedImageObject) - which is a PTP v1.1 operation code
0.287111 PTP2/ptp2/library.c(2): 0x4002 (PTP_EC_ObjectAdded)
0.287175 PTP2/ptp2/library.c(2): 0x4006 (PTP_EC_DevicePropChanged)
0.287233 PTP2/ptp2/library.c(2): 0x400a (PTP_EC_StoreFull)
0.287291 PTP2/ptp2/library.c(2): 0x400d (PTP_EC_CaptureComplete)
0.287357 PTP2/ptp2/library.c(2): 0x5001 (PTP_DPC_BatteryLevel)
0.287383 PTP2/ptp2/library.c(2): 0x5010 (PTP_DPC_ExposureBiasCompensation)
0.287409 PTP2/ptp2/library.c(2): 0x5011 (PTP_DPC_DateTime)
0.287435 PTP2/ptp2/library.c(2): 0x502c (PTP_DPC_AudioVolume)
0.287461 PTP2/ptp2/library.c(2): 0xd006 Kodak and Canon extension, no Ricoh extension
0.287486 PTP2/ptp2/library.c(2): 0xd801 (not defined extension)
0.287512 PTP2/ptp2/library.c(2): 0xd802
0.287540 PTP2/ptp2/library.c(2): 0xd803
0.287565 PTP2/ptp2/library.c(2): 0xd805
0.287591 PTP2/ptp2/library.c(2): 0xd806
0.287617 PTP2/ptp2/library.c(2): 0xd807
. Those code are defined in libgphoto2/camlibs/ptp2/ptp.h
- Later it indicates that the ObjectInfo for directory 'DCIM' has ObjectFormat: 0x3001 (but no Width or Height). Naming scheme seem to be DCIM/100RICOH/R00100*.JPG. Images have the following format:
0.397518 PTP2/ptp2/library.c(2): ObjectInfo for 'R0010001.JPG':
0.397574 PTP2/ptp2/library.c(2): Object ID: 0x00640001
0.397615 PTP2/ptp2/library.c(2): StorageID: 0x00010001
0.397653 PTP2/ptp2/library.c(2): ObjectFormat: 0x3801
0.397692 PTP2/ptp2/library.c(2): ProtectionStatus: 0x0000
0.397732 PTP2/ptp2/library.c(2): ObjectCompressedSize: 2399487
0.397771 PTP2/ptp2/library.c(2): ThumbFormat: 0x3808
0.397809 PTP2/ptp2/library.c(2): ThumbCompressedSize: 3164
0.397848 PTP2/ptp2/library.c(2): ThumbPixWidth: 160
0.397894 PTP2/ptp2/library.c(2): ThumbPixHeight: 120
0.397935 PTP2/ptp2/library.c(2): ImagePixWidth: 3584
0.397969 PTP2/ptp2/library.c(2): ImagePixHeight: 1792
0.397993 PTP2/ptp2/library.c(2): ImageBitDepth: 8
0.398017 PTP2/ptp2/library.c(2): ParentObject: 0x00640000
0.398042 PTP2/ptp2/library.c(2): AssociationType: 0x0000
0.398067 PTP2/ptp2/library.c(2): AssociationDesc: 0x00000000
0.398091 PTP2/ptp2/library.c(2): SequenceNumber: 0x00000000
0.398115 PTP2/ptp2/library.c(2): ModificationDate: 0x00000000
0.398139 PTP2/ptp2/library.c(2): CaptureDate: 0x50e21942
- With the command env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt --port=ptpip:192.168.1.1 "--camera=PTP/IP Camera" -L I got a list of files (including their number), with env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt --port=ptpip:192.168.1.1 "--camera=PTP/IP Camera" -p=9 I received R0010009.JPG:
December 5, 2013
- Upgraded the Ricoh Theta Windows program from version 1.1 to version 1.3. Upgraded the firmware from 1.02 to 1.10.
- Installed the Android App.
- Connected the Theta to nb-ros (Ubuntu 12.04 LTS). The device was recognized and mounted on usb 3-2. In addition, I also received a message from ep 0x2 - rounding interval to 8 microframes, ep desc says 10 microframes. So maybe I have a webcam under Linux.
- Yet, the command ls -ltr /dev/video* showed only one video4linux device. Tried the command hwinfo --usb | more. Showed for the Integrated_Webcam "uvcvideo is active", yet nothing for the Theta.
- The microframe warning indicates that there is a problem with the firmware. The Theta is also not visible as disk.
-
- Connected the Logitech QuicCam. Now uvcvideo shows up in dmesg | tail, indicated that a webcam is connected. I have also a /dev/video1.
- Watching the stream with cheese works, but there is no option to select another camera. With mplayer I have more control: mplayer -fps 30 -cache 128 -tv driver=v4l2:width=640:height=480:device=/dev/video1 tv://.
- Now looking at OCamCalib: Omnidirectional Camera Calibration Toolbox for Matlab, Version 3.0.
December 2, 2013
- Gave today the lecture about the Kalman Filter.
- Checked Large-Scale 3D Point Cloud Processing Tutorial, but the presentations are not online (yet).
- Checked the labbooks of previous year. For assignment 3, they replaced the given code with the code of assignment 2 to get it working.
- Students are recording a second dataset, as test-set (against training-set).
November 19, 2013
- Should try to use Siegwart and Scaramuzza's calibration toolbox on Ricoh's Theta camera (which should arrive today).
November 13, 2013
- Found the following existing interfaces between ROS and MATLAB.
- First tried the ROS-examples in the youBot User Manual (section 8.1.4). First time the motor was off, second time motor was on. Both times I receive 'No socket connection on eth2'. Checked the configuration file at /home/youbot/youbot_driver/config.
- Tried youbot/driver/bin/base_arm_gripper_test, but also here 'no connection to eth2'. As root, I could start the test. Log indicates that 6 EtherCat slaves are found, but only 4 could be configured. Test with arm and gripper failed. Switched arm on (button from red to green).
- With power on 9 ethercat slaves were found. Gripper test was now succesful, armtest not yet. Installed gnuplot and moved the arm in a different start-position. Still no success, warning is about thread still active. Try a reboot.
- No difference with reboot, still warning about receive is not possible if the EtherCAT master has no no thread.
- Logged in as root with command sudo -s. Now roslaunch youbot_oodl youbot_oodl_driver.launch works, but also fails on communication to the arm.
November 12, 2013
- The kctserver partly works. After setting kctsettcpip('ICT'), t = kctclient('192.168.1.18') report that MATLAB is connected to the KUKA robot. MATLAB is now waiting on ST_SKIPSENS, and the kctsettcpip has a segmentation fault.
- Fault is in pthread_create. kctclientmex is not defined for type 'char'.
- According to SensorInterface manual, ST_SKIPSENS is a RSI command which let the robot move directly to the next point. Yet, the youbot has no RSI commands. The youbot has a completely different interface, build by University of Applied Sciences Bonn. The youbot_driver has a EthercatMaster running, but not on port 6008. I should rewrite the thread function in kctserver and redirect the commands to the Manipulator object. This is my Linux port of the kctserver-code.cpp.
October 30, 2013
- Created scripts fuerte_setup.sh, groovy_setup.sh and hydro_setup.sh. ~/ROS/packages is not (yet) part of the environment variable ROS_PACKAGE_PATH.
- As said in the Gazebo, Gazebo is now a stand-alone package and has no longer (direct) ROS dependencies.
- Followed the instructions, and removed ros-fuerte-simulator-gazebo ros-groovy-simulator-gazebo. Also included gazebo-current, which removed ros-hydro-simulator-gazebo. Also drcsim was lost :-).
- Added catkin_ws/devel_setup.bash to ./bashrc.
- The catkin_ws/devel/setup.sh has a direct link to the ROS_DIST. Performing catkin_init_workspace creates in catkin_ws/src/CMakeList.txt as link to /opt/ros/ROS_DISTRO/share/catkin/cmake/toplevel.cmake.
- Moved the original catkin_ws to ROS/groovy. Checked out youbot_ros_tools, but also got branches/groovy.
tools, but also got branches/groovy.
- catkin_make worked, catkin_make install -DCMAKE_INSTALL_PREFIX=/opt/ros/hydro, because sudo didn't have the paths to catkin. A simple catkin_make install installed the packages in catkin_ws/install/share. Yet the launch-files are still in catkin_ws/src. Running roslaunch lauch/youbot.launch fails on missing youbot_description/robots/youbot.urdf.xarco.
- Modified the CMakeLists.txt in youbot_description, but this directory is never included in the make. Same for old groovy distribution.
- Downloaded the xarc (hydro branch), did a catkin_make install. Manually copied the youbot_description directories (urdf, gazebo) and gazebo/worlds to install/share. Now the simulation works (but a bit unstable ;-)):
October 28, 2013
- Looking for the Gazebo simulation of the Kuka youBot. Found github project. This project is a catkin project. In fuerte, catkin was still an alpha release. This project is also a hydro project, the ros-version after groovy. My /home/arnoud/ROS/.rosinstall points to /opt/ros/fuerte. Switched to groovy with command source /opt/ros/groovy/setup.bash. catkin_make now works, but fails because it want to be invoked in the root of the workspace. Read Catkin tutorials.
- Created a /home/arnoud/catkin_ws. Moved youbot_ros_tools to /home/arnoud/catkin_ws/src. Performed a catkin_make and catkin_make install. Results are in /home/arnoud/catkin_ws/install. Performed /home/arnoud/catkin_ws/install/setup.sh, followed by roslaunch youbot_gazebo youbot.launch. Yet, the youbot.launch is not found. Made a copy of src/youbot_ros_tools/youbot_gazebo/launch in install/share/youbot_gazebo, but still launch file is not found.
-
- Instead looked at the Kuka Matlab Control Toolbox, from the University of Sienna, available from sirslab. Did a checkout on nb-udk, the command kctrobot gave the following robots: KR3, KR5sixxr650, KR5sixxr850, KR5arc, KR5arcHW, KR6-2KS, KR15SL, KR16-2, KR16-2S, KR16-2KS, KR16LS-2 and KR16L6-2KS. Luckely, my version is according to kctchecksystem OK (v8.0.0 and Instrument Control Toolbox).
- With kctinsertrobot I would be able to insert at least the youbot robotarm. Seems that I only have to specify lenghts of the links. Tested kctsettcpip('ICT') and ready for next command t = kct_client("xxx.xxx.xxx.xxx) followed by kctreadstate.
-
- Started with installing hydro-version on nb-ros with sudo apt-get install ros-hydro-desktop-full.
October 24, 2013
Previous Labbooks