Started Labbook 2021.
December 28, 2020
- In a 2h video of the History of AI Claude Shannon shows in 1952 how a mouse (called Theseus) can explore a maze (52:19-59:17). He build this nice demonstration with his wife Betty.
December 23, 2020
- Picked up Sam. Sam was still in DNT-mode.
- Sam was not visible wirelessly, so connected to Sam with an ethernet cable.
- Sam was visible as sam.local. Disabled the DNT-mode with mv robocup.conf robocup.conf.dnt and rebooted.
- Now Choregraphe is able to connect to Sam, although I get the warning that Choregraphe 2.5.10.7 may not compatible with NAOqi-2.8. At least the Video Monitor works fine.
- According to the webinterface, Sam is running NAOqi v 2.8.5.10.
December 21, 2020
- The webots is loaded (nao_indoors.wbt).
- Trying to start Choregraphe with command /opt/Aldebaran Robotics/Choregraphe Suite 2.1/bin/choregraphe_launcher, but this fails because libpng16.so.16 required libz.so.1 v1.2.9, which is not ../lib/libz.so.1
- As indicated here, the libz.so provided with choregraphe is not needed. The libz.so.1 in /lib/x86_64-linux-gnu/ is v1.2.11.
- Made in choregraphe's lib a link to latest version with sudo ln /lib/x86_64-linux-gnu/libz.so.1.2.11 libz.so.1.2 and pointed libz.so.1 to this libz.so.1.2, instead of directly copy of libz.so.1.2.8. Now Choregraphe 2.1.4 starts!
- The simulated Nao is not visible, but that is because I loaded a world from /usr/local/webots/projects/robots/softbank/nao/worlds.
- Did a git clone from naoqisim repository and loaded naoqisim_indoors.wbt. Recieved a warning that it couldn't find naoqisim, naoqisim.py or naoqisim.m, with the hint to compile the code first.
- I set the environment variables WEBOTS_HOME (export WEBOTS_HOME=/usr/local/webots) and LD_LIBRARY_PATH as indicated. Typing make in ~/git/naoqisim started a download of simulator-sdk-2.1.4.1-linux64.tar.gz, as specified in aldebaran/Makefile.
- Checked if simulator-sdk-2.5.5.5-linux64.tar.gz was also available, but that seems not the case.
- The naoqisim controller starts, but is still not visible. It report also some errors and warnings:
- ../../aldabaran/simulator-sdk/bin/hal: error loading shared libraries libusb-0.1.so.4
- qimessaging.transportSocket: connection refused
- TransportServer will listen on: tcp://192.168.178.49:9559
- Loading ~/git/naoqisim/aldebaran/simulator-sdk/etc/naoqi/autoload.ini
- Error the DCM did not find the HAL: DCM Exiting
- ALRedBallTracker is deprecated in version 1.16
- packagemanager: Cannot check column install_time in packages
- altts: Couldn't find plugin aitalk
- altts: Couldn't find plugin acapela
- altts: Couldn't find plugin nuance
- Webot cameras enabled
- Add the '-nocam' option in 'controllerArgs' to disable the camera and increase the simulator performance.
- AlPythonBridge: using naoqi from ~/git/naoqisim/aldebaran/simulator-sdk/lib/naoqi.py
- Could not load library: "~/git/naoqisim/aldebaran/simulator-sdk/lib/naoqi/libmodularityperception.so"
- Error was: could load libpng12.so.0
- Launcher received exption during module creation: segmentation3D. Can't find service: ALModularity
- Error occured during thinking while getting info of animation package animations: Package animating does not exist in database.
- Dialog: ALSpeechRecognition has not been found. Will run without voice recognition.
- NaoQi is ready ...
- Did sudo apt-get install libusb-0.1-4 and the naoqisim controller is started (Press the real-time button to start the simulation).
- In the alsim controller I receive some errors / warnings:
- DeviceManager::specialIdsCase: No Module Body found
- error: usb: USB device not found
- I2CThread: Unable to open /dev/i2c-head
- warning; halthread: can't setup realtime priority for I2C
- TestRobotVersionPlugin: No robot version
- diagnosisPlugin: Found 22 boards to log
- @@@@ Use relative clock @@@@
- DcmLostPlugin: HAL stiffness decrease ended: HAL error back to 0 due to DCM start
- ClientSyncPlugin: DCM detected
- Started the real-time simulation. The robot wasn't visible, but connecting with an explicit ip and port worked.
- Could move the robot from StandZero to StandInit, and say the First Words (in the Dialog, no sound system connected):
December 17, 2020
- Webots has a new release. It supports now image segmentation, like Carla.
- It no longer supports the interface to NaoQi, although the old interface is still available on github (and updated 5 months ago).
- The Readme points to NaoQi 2.1, but there is also documentation for Naoqi 2.5.
- Aldebaran has a new download site. Linux downloads can be found developer site. The newest version of Choregraphe is 2.8.6, the Python SDK is still pyton2.7 based.
- Updated the instructions for Ubuntu 20.04 with pynaoqi 2.8.6 and tested it on my XPS-8930.
- Downloading Webots 2021 from Cyberbotisc as Debian package.
- Could better has used the repository option.
- Seems that the Simulation SDK is only available for Naoqi 2.5. Couldn't find it in naoqi-sdk-2.8.5. Seems that 2.5 is no longer available for download. On my old nb-dual I have only Naoqi up to 2.1.4.13
- On home.uva.nl I have the packages for naoqi 2.5.5.5, but only for Windows.
- NaoqiSim was tested NaoqiSim with Choregraphe 2.1.4. On my old nb-dual I have pynaoqi for 2.1.4.13 for linux64 and win32, but not Choregraphe. In the Downloads of my nb-dual there is a Windows-version of Choregraphe 2.1.4.13.
- An installation file can still be downloaded from here. The list with older versions still available is here
- NaoQi 2.5 was a Pepper version, the old version of Choregraphe for Pepper can be found here.
- Used the default installation for Choregraphe 2.1.4, which means that the suite is installed in /opt/Aldebaran Robotics. Didn't see the Simulation SDK directly in the ./lib.
- Following the instructions of naoqisim github and start webots. webots fails on libz which is the wrong version. ldd shows that many dependencies are missing. Started with sudo apt-get install libqt5gui5. Also libpico is missing. Could find github, but that has only a xenial installation file. For focal I should make it from source.
- Started webots in fresh terminal without problems. Could start the nao_demo.wbt file. There are other files (robocup, matlab, robotstadium, indoors, get_the_candles), but no clean nao.wbt file.
December 15, 2020
- Found that Coppelia Robotics has a Nao simulation, and the Edu variant is free.
- Here there is a github example of a Nao robot searching trough a labyrinth.
- Here is another good github readme, with instruction on the configuration, but no code.
- A more experienced implementation seems the V-Rep Nao bridge by researchers from Rome and Inria.
December 13, 2020
- Found the BOLeRo, which provides a tool for learning behaviors with both a C++ and Python interface. Yet, the focus is on learning.
December 9, 2020
- Followed the instructions of this post and included --net=host to the commandline (together docker run -it --rm --privileged -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:ro --net=host bbr-image bash.
- After installing x11-apps, I could start xeyes from this bash terminal.
- Unfortunatelly, the application cheese still fails on libGl error: failed to load driver: swrast;libEGL error: DIR3:Screen seems not DRI3 capable.
- Followed the instructions of hardware accelerated opengl in docker, and downloaded a new version of the nvidia driver (450.80.02) into ubuntuWithNvidiaDriver. Yet, installing it natively fails, because nvidia-drm is loaded. This could be something specific from my 2nd screen (with USB-support). Downloaded the older (beta) version (450.51), pointed to this version in the script build.sh and run the script. Failed on missing mod-tool. Did a sudo apt-get update, because I was outdated on quite some packages. Checked my nvidia-drivers version again with nvidia-smi.
- According to nvidia-smi there was now a driver mismatch, so I rebooted (without 2nd screen). The nvidia version is now the stable (450.80.02), so I modified build.sh. The build fails on a missing modprobe, but adding RUN apt-get install kdm to the DOCKERFILE solves that.
- Had to modify run.sh so that glxinfo worked. Tried cheese, which worked, only didn't had access to /dev/video0.
- Added cheese to the docker file and did a rebuild.
December 2, 2020
- Created on my Linux workstation a docker image, based on these instructions.
- The command docker run hello-world failed, so added myself to the group following these instructions.
- Rebooting was needed to reevaluate my group membership.
- Created an Ubuntu 20.04 image, but didn't installed nginx, php-fpm and supervisord from ubuntu repository.
- Did docker build -t bbr-image. The image is visible with docker image ls.
- Did docker run --name bbr-container -d -it bbr-image, whereafter I could get into the container with docker attach bbr-container. After exit the command docker ps -a showed that three containers have been run.
- Did a git clone https://github.com/Maegori/Pepper-Lab42 to get a Dockerfile with Ubuntu 16.04 with python2.7 and opencv.
- Building this image took a few minutes.
- Not all instructions worked as expected. My workstations Ubuntu 20.04 has no xhost (wayland based?!), so xhost +local:root failed.
- With docker run -it .... I came directly in ~/source#.
- Running the full the full command docker run -it --name pepper --net=host --env="DISPLAY" --volume="$HOME/.Xauthority:/root/.Xauthority:rw" --device=/dev/input/ -v ${PWD}/source:/root/source lab42 followed by docker start pepper and docker attach pepper worked (after double ENTER).
- Tested all imports of Lab42.py, and that worked (including from naoqi import ALProxy). Haven't tested importing opencv yet.
- Tested import cv2, also works. Unfortunately, camera = cv2.VideoCapture(0) fails with V4L: can't open camera by index 0.
- Tried the tricks of this issue, but adding --privileged --device=/dev/video0:/dev/video0 didn't help.
- ARRGH, although it is a mobile screen, still my workstation is no laptop. There is no webcam attached (always check ls /dev/video0 first. Connected an USB-webcam. Cheese works!
- Now I get the error: V4L2: Pixel format of incoming image is not supported by OpenCV
- Used v4l2-ctl -d /dev/video0 --list-formats, which showed that my Logitech webcam had 'PWC2' and 'YU12'. I expected that the last one should be readable, but saw no option to select the second format (other than camera.set(cv.CV_CAP_PROP_FOURCC, "YU12"), but that is only possible when the object is created. I can do camera = cv2.VideoCapture(), but the CV_CAP is not defined. I have opencv3, so from cv2 import cv doesn't work anymore (as suggested in stackoverflow). The command for opencv3 should be camera.set(cv2.CAP_PROP_FOURCC, cv2.VideoWriter_fourcc(*'YU12')), but that gives a false.
- Checked other cameras on my disposal. The Structure showed no /dev/video0, the RealSense D435 gave 'Z16 ' and format ''. The DepthSense DS325 gave 'MJPG' and ÝUYV', which I could read with ret,frame = camera.read() and save with cv2.imwrite("DepthSenseFrame0.png", frame). Unfortunatelly cv2.namedWindow("DepthSense") gave the Gtk error message: Failed to load module "canberra-gtk-module", which explains why cv2.imshow("DepthSense", frame) did nothing.
- Looked if I could install vim and cheese in bbr-image. The last required quite some packages (including python3!). Yet, starting cheese gave unable to init server: connection refused; Unable to initialize licheese-gtk.
- Installed x11-apps, and tried to run xeyes, but that program couldn't open the display. Used some of the tricks as suggested here, but that didn't help. Maybe adding -v /tmp/.X11-unix will help.
October 12, 2020
September 21, 2020
- Interesting mix of Matlab and Python in this blog.
June 29, 2020
- Following the 'How to install all you need Windows' instructions on my new XPS 13. The 2019-10 version is still the last Anaconda2 version, to prepare for the Pepper video tomorrow.
- Installed it in C:/Programs/Anaconda2, instead of the default C:/ProgramsData/Anaconda2.
- Instead of the Windows cmd prompt, I used the Anaconda cmd prompt. I could import cv2
- I had already added PYTHONPATH to my environment. Still import naoqi fails, but on import qi (DLL load failed). Looked at the MAC instruction of Aldebaran, and added the environment variables DYLD_LIBRARY_PATH and QI_SDK_PREFIX. Doesn't help.
- My Window cmd prompt jumps to the App store if I type python, but Anaconda didn't recommend to add its bin to the PATH. Continue with the Anaconda cmd prompt for the moment.
- Problem seems to be that I downloaded for the Pepper pynaoqi for win32, while the BBR instructions specify the win64 version. Yet, I cannot find an win64 on the Aldebaran site anymore.
- A workaround is to use the win32 python2.7 version which is part of the ChoregrapheSuite. In my Windows cmd prompt I did set PATH=${PATH};C:\Packages\Aldebaran\ChoregrapheSuite2.5\bin and set PYTHON_PATH=C:\Packages\Aldebaran\ChoregrapheSuite2.5\lib\python2.7\Lib;C:\Packages\Aldebaran\ChoregrapheSuite2.5\lib. I can now call python-orig and do import naoqi. The packages needed for BBR (import numpy and import cv2) are not available in this environment.
February 17, 2020
- Found that the maze was also solved in ZSB 2016, where the corridors were followed based on a white floor.
February 12, 2020
- Nice example of Ant behavior with pheromones.
January 28, 2020
- Switched the order of LD_LIBRARY_PATH. Choregraphe still works, couldn't test ssh because I could connect only to science park, and both vpn scripts directly return 443. The executable ncsvc seems to be old: v7.5 from 2014.
- With the Pulse UI I could start vpn and start a ssh connection.
January 27, 2020
- Mio didn't say anything. Switched off the old DNT code by going to ~/DNT/bin and executing the to_naoqi_v5 script.
- Still no sound, so with nb-dual I made under Linux a wired connection, looked at the ip-adress with ping mio.local and used that ip-adress to access the webinterface (and increased the volume from 15% to 60%).
- Tomorrow I will check the sonar.
- Had difficulties to use ssh on nb-dual, because the aldebaran ssl.so is not compatible with ssh. Removed aldebaran path temporally from LD_LIBRARY_PATH.
January 21, 2020
- Helping with Quest II. Students reported that Hough returns no object found, but draw the circles anyway.
- Saw no summerschool directory on nb-ros.
- In Quest II, they should first clean the image with blur. A tutorial on blur is available here.
January 20, 2020
January 15, 2020
- I found the Leanne's translation of the Summmerschool assignments, including the assignment 3b (using the tags). No remarks about clearing the buffer after a snapshot.
- The Summerschool is still available at Wayback machine.
- Looked into the getSnapShot problem. In the v2.1 documentation I see the warning: "the same Name can be used only six times". Same in v2.8. For the C++ code, a getImageRemote is followed by a releaseImage. Cannot find the python API for ALVideoDevice?
- In v1.14 they called camProxy.releaseImage().
- The VideoDevice is completely refractored in NaoQi v2.0. Reading Advanced notes. Here, the max number of names is 8! The actual number of buffers on the robot is 4.
-
- Looking at the code, creating C:\onderwijs\BehaviorBasedRobotics\Assignment 2_cv3_new on nb-dual. In the Anaconda prompt, python and import cv2 works, but import naoqi fails.
- Adding set PYTHONPATH=...\pynaoqi\lib solves this, import naoqi works. Some problems with connecting to robolab, maybe due to the reset of the router yesterday. Forgot the network, and could connect. Yet, network keeps kicking me out. Used a wired connection.
- Running python config.py worked, I received a snapshot_hsv.jpg, although it is not clear where the call to save is made.
- Updated the code to use the new qi.session.service. Motion and posture goes well, get an error that the bytearray cannot be converted. Should look at v2.4.3 example code
- Installed PIL (v1.1.7) via conda with command conda install -c anaconda pil.
- Found some interesting hsv examples
- Could handle some exceptions, but shutting down gracefully is hard. The handling-function should be outside the class, but reloading the modules by name doesn't work because the session and proxies are not intialized (and should be known to be closed).
January 14, 2020
- Found a book from 2013 from Henry Hexmoor, from Southern Illinois University, which is partly behavior based. Looked at Chapter 1 and the presentations
- He also organized a workshop on Motion Planning for Physical Robots.
- Lecture 2 is about behaviors.
- Lecture 3 is about architectures. I liked the sequence RCS-1 to RCS-4 at slides 20-23, where more and more elements are added (including Value Judgement in RCS-4).
- The full book of Henry Hexmoor is available via the university library, the pdf is available via ieee explore.
- The IEEE Spectrum special issue on Becoming Bionic is still available Suchart Yammen's site (p. 24-29)
- In chapter 14 Henry points to a publications of La Valle, about a Game Theory formulation of robots. This publication is available here. Quick check reveiled that this was less interesing than I hoped for.
- Most of the later lecture slides are quite short (e.g. 34 slides for all type of sensors).
- Lecture 7 points to Michael A. Goodrich's Potential Fields Tutorial (2002).
- Nice example (maybe reusable in next weeks lecture) is the left-right test based on the determinant (on slide 21 of lecture 8).
- The case study of reactive navigation is based on this chapter (2007). The book has more interesting chapters, such as Comparative analyis of (EKF) localisation modes.
-
- The Nao V6 robots walk more robust when the start in predefined StandInit posture.
January 8, 2020
- The webinterface getting stuck should be fixed in v2.8.6. Yet, the Nao has an internet connection. Could try to upgrade Ferb to 2.8.6.
- Version 2.8.6 is not available (yet) from Aldebaran resources.
-
- Was able to connect to moos.local. Did it with nb-dual. With ifconfig I found that I only received a ipv6 address. Performed a ipv6 scam with ping6 -I eth0 ff02::1, but I couldn't use that address for ssh. Switched the setting of the wired connection from Automatic to Local Link only. Then I received an ipv4 address. Could have done a ipv4 scan on the ssh-port with sudo nmap -sS -p 22 169.254.252.0/24. Yet, ssh nao@moos.local worked. Could not use this in the browser, but ssh known host mentioned the ip-adress.
- Could not change the volume due to the webpage bug, but downloaded choregraphe v2.8.5 for Linux.
- Starting the installer was quite a puzzle:
- First I had to make the downloaded run-file executable.
- The default location is /opt/nao/choregraphe2.8. Had to rename the existing program to 2.8.2, and installed the new program under /opt/nao/choregraphe2.8.5.
- Still, the program didn't run, so added ./bin and ./lib to PATH resp LD_LIBRARY_PATH.
- The executable choregraphe-script was not in ./bin, so I created which also works (otherwise you hva to use the commmand choregraphe_launcher.
- Still, the program failed on a wrong version of libz.so.1. Copied /usr/lib/x86_64-linux-gnu/libz.so to ./lib/libz.so.1.2.9 and moved the symbolic link ./lib/libz.so.1 from v1.2.8 to v1.2.9.
- Now Choregraphe 2.8.5 works!
- Renamed robocup.conf to robocup.conf.dnt on both moos and phineas and increased the volume to 66%.
-
- Installed anaconda2.
- Got the warning that PYTHONPATH was defined, and that I should make sure that it points to directories of packages which are compatible with the python interpreter in /home/arnoud/anaconda2.
- Unfortunatelly, the PYTHONPATH is defined as /usr/lib/python3. This directory only contains dist-packages, while there are also several other /usr/lib/python*.* directories. The directory /usr/lib/python2.7 contains both a directory dist-packages as many python scripts.
- My PYTHONPATH was defined in ~/.bash_profile. Changed it to /usr/lib/python2.7, which is nearly the default definition.
- Yet, conda fails with this PYTHONPATH. Removing the environment variable completly solved this issue.
- Tested the installation instructions from Canvas.
- First, it seemed good to include the pynaoqi directory as naoqi in ~/anaconda2/lib/python2.7/site-packages. Yet this didn't work. Also adding a link to ~/packages/pynaoqi/lib/python2.7/site-packages as naoqi didn't work. Adding that path to PYTHONPATH solved the issue: I could do import naoqi.
January 7, 2020
- Checked Ferb. Seems to be running NaoQi 2.8.5.11 without DNT script. Connected it to the internet. Couldn't synchronize, so I couldn't lower the volume via the webinterface. Choregraphe is too old version (2.4) to change the volume.
- Looked for the configuration files on Ferb. Found /etc/conf.d/naoqi and /nao/etc/systemd/user/. /etc/conf.d/naoqi point to /opt/aldebaran.
- There are configuration for autonomy, but for juliette and romeo. Points to ~/.config/naoqi/. Switched ALCloud.xml off. The modules that are loaded can be found in /opt/aldebaran/etc/naoqi/autoload.ini. Still no contact to server.
- Downloading Choregraphe-suite.exe v2.8.5.10. Lowered Ferb's volume.
- According to DNT, connecting to nao@robotname.local only works under Linux.
- The pynaoqi v2.8.5.11 contains less files than the previous version, so import naoqi fails (under Ubuntu)
January 6, 2020
- Checked Sam. Seems to be running NaoQi 2.8.5.10 without DNT script.
- The ~/naoqi/preferences/autoload.ini only contains comments.
- The ~/robocup.conf.dnt is empty. As indicated in January 14, 2019, renaming ~/robocup.conf is the key to switch the DNT code off.
- On the installation folder of canvas there was still the pynaoqi-python2.7-2.1.4.13 versions.
- Downloaded pynaoqi-python2.7-2.8.5.10 versions from Aldebaran resources.
- The Aldebaran installation guide still mentions 32bits version of python2.7. Yet, the Windows version is win64, so this seems obsolete.
- On nb-dual, I still have IPython, which runs python 2.7.12 bases on Anaconda 4.2.0 (32 bits). Yet, import naoqi fails, so the PYTHONPATH is not correct installed. Also import cv2 fails. The version can be found in C:\packages\Anaconda2. No PYTHONPATH in my command prompt settings. import matplotlib works, that is part of the default installation of Anaconda.
- The Anaconda2 2019.10 installer complained that there was already a 64bits version installed in C:\packages\Anaconda2. Activated the options to associate python2.7 with the new version of Anaconda2 in C:\packages\Anaconda2019.
- Followed the getting started instructions and launched the 64bits Navigator. The Spyder IDE was the best option. Typing print("Hello Spyder") worked, as import numpy. The version displayed in the IPython console is Python 2.7.16 | IPython 5.8.0.
- Question is which version of opencv I should install.
- The developer page says the latest (which I doubt). The naoqi 2.8 mentions OpenCV 3.1. Last year's Windows installation instruction recommended opencv=2.4.11, the Ubuntu 18.04 pointed to a github page with a script to install opencv-2.4.13.5. Also the Mac version installed version 2.4.13.5. Stackoverflow suggested conda install -c conda-forge opencv=3.2.0.
- Checked the OpenCV releases. Latest v4 is 4.2.0, v3 is 3.4.9, v2 is 2.4.13.6. Latest v3.1 is 3.1.0. Going to try to install 3.4.9 with conda install -c conda-forge opencv=3.4.9 from the Anaconda prompt.
- The command conda install -c menpo opencv3 failed at 98%. Trying it again failed with OK environment.
- Performed conda search opencv. Saw version 3.3.1, 3.4.1, 3.4.2 and 4.0.1 in pkgs/main. Tried to install v3.4.2. Fails on conflicting dependencies.
- Tried again with conda search -c menpo opencv3. Showed v3.1.0, v2.4.11 en v2.4.9.1 for py27
- Only with the last one, the install skipped the local repodata and tried to solve an intiaital frozen solve. Maybe I should try a conda update -c menpo opencv3.
- For v2.4.9.1 the main conflict is with numpy-base and vc. After two hours, the result was that the package could not be installed.
- Installed without any problems conda install -c menpo opencv -v for win32 prompt. import cv2 worked fine.
- You can see the build versions with conda search -c menpo opencv3. Only the channel of menpo has py27 builds.
- The command conda install -c menpo opencv3=3.1.0=py27_0 initially still failed, but after conda clean -a I finally had the command conda install -n base -c menpo opencv3=3.1.0=py27_0 -v worked:
## Package Plan ##
environment location: C:\packages\Anaconda2019
added / updated specs:
- opencv3==3.1.0=py27_0
The following packages will be downloaded:
package | build
---------------------------|-----------------
conda-4.8.1 | py27_0 2.8 MB
opencv3-3.1.0 | py27_0 44.4 MB menpo
------------------------------------------------------------
Total: 47.2 MB
The following NEW packages will be INSTALLED:
opencv3 menpo/win-64::opencv3-3.1.0-py27_0
The following packages will be UPDATED:
conda 4.7.12-py27_0 --> 4.8.1-py27_0
- Now import cv2 works fine under python (win64).
Previous Labbooks