Pc104: Difference between revisions

From ISRWiki
Jump to navigation Jump to search
m (→‎Software: CREATE_LIB_MATH -> YARP_COMPILE_libYARP_MATH)
 
(29 intermediate revisions by the same user not shown)
Line 1: Line 1:
''See [[pc104/Archive]] for information about the previous setup with the read-only pen drive.''
''See [[pc104/Archive]] for information about previous setups.''


The '''pc104 CPU board''' is located into the iCub's head and nowadays it runs a full (read/write) Debian distribution that boots from a USB pen drive.
The '''pc104 CPU board''' is located into the iCub's head and it runs a full (read/write) Debian distribution that boots from a USB pen drive.


= Booting and Mounting =
= Booting and mounting =


After booting, the pc104 mounts a part of the hard-disk of '''icubsrv''' (the Dell XPS laptop, IP address <code>10.10.1.51</code>) which contains the yarp and iCub repositories.
During boot, the pc104 does two things: 1) it loads a Debian Live USB Flash Drive with Persistence; 2) it mounts remote NFS shares from the [[iCub laptop]].


== Repositories on icubsrv laptop ==
== USB Flash Drive ==


Note that the icubsrv laptop has 2 locations for the repositories:
With respect to the standard image provided by the official iCub support, our configuration differs in the following files:
* <code>/exports/code-64</code> for the laptop itself (compiled for 64bit, rarely used)
* <code>/exports/code-pc104</code> for pc104 (compiled for 32bit, this is the one that is actually used)


== Updating the repositories ==
.bashrc_iCub
/etc/network/interfaces
/etc/hosts
/etc/fstab
/etc/rc.iCub.d/mounts.list
/etc/rc.iCub.d/S90_mount-remote-fs.sh
/etc/timezone
/etc/resolv.conf
/etc/udev/rules.d/70-persistent-net.rules
/etc/default/ntpdate


First method: from a pc104 console, normally update and compile the repositories as if on a normal machine - see [[RobotCub software]] for details. Note that after compiling iCub you must type <code>make install_applications</code> as well: this will copy files from <code>$ICUB_ROOT/main/app/robots/iCubLisboa01</code> to <code>$ICUB_ROOT/app/iCubLisboa01</code> (check that the new versions are effectively copied).
== NFS shares ==


If the above method fails for any reason (old version of svn, internet problems with DNS or NTP, etc.) you can use the following workaround:
The mounted volume contains the yarp and iCub repositories (both code and binaries) and configuration files. The binaries are located in the respective '''build-pc104''' subdirectories.
# open a pc104 shell window
# open an icubsrv shell window
# on icubsrv: <code>svn update /exports/code-pc104/yarp2</code> and <code>/exports/code-pc104/iCub</code> (for now we need to do this from icubsrv because the version of svn on pc104 is too old)
# on pc104: cmake, make in <code>$YARP_DIR</code> (the files are physically on icubsrv, but we need to issue the command from pc104 to obtain 32bit binaries)
# on pc104: cmake, make, make install_applications in <code>$ICUB_DIR</code> (the files are physically on icubsrv, but we need to issue the command from pc104 to obtain 32bit binaries)


= Software =
= Software =


* Custom yarp configuration
* Dependencies for 640x480@30Hz images with Bayer encoding
 
sudo apt install libraw1394-dev libdc1394-22-dev
 
* yarp CMake configuration


  CMAKE_BUILD_TYPE Release
  CMAKE_BUILD_TYPE Release
  CREATE_DEVICE_LIBRARY_MODULES ON
  CREATE_DEVICE_LIBRARY_MODULES ON
  CREATE_LIB_MATH ON
  YARP_COMPILE_libYARP_MATH ON
  ENABLE_yarpmod_portaudio ON
  ENABLE_yarpmod_portaudio ON
ENABLE_yarpmod_serial ON
  ENABLE_yarpmod_serialport ON
  ENABLE_yarpmod_serialport ON


  CREATE_OPTIONAL_CARRIERS
  CREATE_OPTIONAL_CARRIERS
  ENABLE_yarpcar_bayer_carrier
  ENABLE_yarpcar_bayer ON
ENABLE_yarpcar_mjpeg ON


* Custom iCub configuration using robotInterface
* icub-main CMake configuration


  CMAKE_BUILD_TYPE Release
  CMAKE_BUILD_TYPE Release
Line 49: Line 55:
  ENABLE_icubmod_cfw2can ON
  ENABLE_icubmod_cfw2can ON
  ENABLE_icubmod_dragonfly2 ON
  ENABLE_icubmod_dragonfly2 ON
  ENABLE_icubmod_dragonfly2raw ON
  ENABLE_icubmod_gazecontrollerclient ON
ENABLE_icubmod_icubarmcalibrator ON
ENABLE_icubmod_icubhandcalibrator ON
ENABLE_icubmod_icublegscalibrator ON
ENABLE_icubmod_logpolarclient ON
ENABLE_icubmod_logpolargrabber ON
  ENABLE_icubmod_parametricCalibrator ON
  ENABLE_icubmod_parametricCalibrator ON
  ENABLE_icubmod_sharedcan ON
  ENABLE_icubmod_sharedcan ON
  ENABLE_icubmod_skinWrapper ON
  ENABLE_icubmod_skinWrapper ON
ENABLE_icubmod_skinprototype ON
  ENABLE_icubmod_xsensmtx ON
  ENABLE_icubmod_xsensmtx ON


* Custom iCub configuration using iCubInterface
* yarp configuration
 
# <code>yarp namespace /icub</code>
# <code>yarp conf 10.10.1.53 10000</code> (yarpserver runs on [[iCub laptop]])


CMAKE_BUILD_TYPE Release
The last command writes the information of the YARP server located on [[iCub laptop]] into the file specified by <code>yarp conf</code>, which is typically <code>/home/icub/.config/yarp/_icub.conf</code>. Warning: that command overwrites previous content.
ENABLE_icubmod_canmotioncontrol ON
 
ENABLE_icubmod_cartesiancontrollerclient ON
* tuning and optimization
ENABLE_icubmod_cartesiancontrollerserver ON
 
ENABLE_icubmod_cfw2can ON
# make sure that <code>CMAKE_BUILD_TYPE=Release</code> for both yarp and icub-main
ENABLE_icubmod_dragonfly2 ON
# <code>cat /proc/sys/net/core/rmem_max</code> // should return 8388608
ENABLE_icubmod_dragonfly2raw ON
ENABLE_icubmod_icubarmcalibrator ON
ENABLE_icubmod_icubarmcalibratorj8 ON
ENABLE_icubmod_icubhandcalibrator ON
ENABLE_icubmod_icubheadcalibrator ON
ENABLE_icubmod_icubheadcalibratorV2 ON
ENABLE_icubmod_icublegscalibrator ON
ENABLE_icubmod_logpolarclient ON
ENABLE_icubmod_logpolargrabber ON
ENABLE_icubmod_skinprototype ON
  ENABLE_icubmod_xsensmtx ON


* Final configuration
= Updating =


# <code>yarp namespace /icub</code>
In addition to yarp and icub-main, '''icub-firmware-shared''' must also be updated (these are scripts, not the firmware itself).
# in order to find the yarpserver running on [[Chico3 laptop machine configuration | chico3]], write <code>10.10.1.53 10000</code> into the file specified by <code>yarp conf</code>
In order to update the firmware, use the binaries in '''icub-firmware-build''' and follow the official iCub manual.


= See also =
= See also =


* [http://eris.liralab.it/wiki/Compilation_on_the_pc104 Compilation on the pc104]
* [http://wiki.icub.org/wiki/The_Linux_on_the_pc104 The Linux on the pc104]
* [http://eris.liralab.it/wiki/The_Linux_on_the_pc104 The Linux on the pc104]
* [http://wiki.icub.org/wiki/ICub_PC104_Linux_Image_-_Detailed_info ICub PC104 Linux Image - Detailed info]
* [http://wiki.icub.org/wiki/Compilation_on_the_pc104 Compilation on the pc104]
* [http://wiki.icub.org/wiki/Generic_iCub_machine_installation_instructions Generic iCub machine installation instructions]
* [http://wiki.icub.org/wiki/CFW002_PC104_linux_driver CFW002 PC104 linux driver]


[[Category:Vislab]]
[[Category:Vislab]]

Latest revision as of 16:08, 28 July 2019

See pc104/Archive for information about previous setups.

The pc104 CPU board is located into the iCub's head and it runs a full (read/write) Debian distribution that boots from a USB pen drive.

Booting and mounting

During boot, the pc104 does two things: 1) it loads a Debian Live USB Flash Drive with Persistence; 2) it mounts remote NFS shares from the iCub laptop.

USB Flash Drive

With respect to the standard image provided by the official iCub support, our configuration differs in the following files:

.bashrc_iCub
/etc/network/interfaces
/etc/hosts
/etc/fstab
/etc/rc.iCub.d/mounts.list
/etc/rc.iCub.d/S90_mount-remote-fs.sh
/etc/timezone
/etc/resolv.conf
/etc/udev/rules.d/70-persistent-net.rules
/etc/default/ntpdate

NFS shares

The mounted volume contains the yarp and iCub repositories (both code and binaries) and configuration files. The binaries are located in the respective build-pc104 subdirectories.

Software

  • Dependencies for 640x480@30Hz images with Bayer encoding
sudo apt install libraw1394-dev libdc1394-22-dev
  • yarp CMake configuration
CMAKE_BUILD_TYPE Release
CREATE_DEVICE_LIBRARY_MODULES ON
YARP_COMPILE_libYARP_MATH ON
ENABLE_yarpmod_portaudio ON
ENABLE_yarpmod_serialport ON
CREATE_OPTIONAL_CARRIERS
ENABLE_yarpcar_bayer ON
ENABLE_yarpcar_mjpeg ON
  • icub-main CMake configuration
CMAKE_BUILD_TYPE Release
ENABLE_icubmod_canBusAnalogSensor ON
ENABLE_icubmod_canBusSkin ON
ENABLE_icubmod_canBusVirtualAnalogSensor ON
ENABLE_icubmod_canmotioncontrol ON
ENABLE_icubmod_cartesiancontrollerclient ON
ENABLE_icubmod_cartesiancontrollerserver ON
ENABLE_icubmod_cfw2can ON
ENABLE_icubmod_dragonfly2 ON
ENABLE_icubmod_gazecontrollerclient ON
ENABLE_icubmod_parametricCalibrator ON
ENABLE_icubmod_sharedcan ON
ENABLE_icubmod_skinWrapper ON
ENABLE_icubmod_xsensmtx ON
  • yarp configuration
  1. yarp namespace /icub
  2. yarp conf 10.10.1.53 10000 (yarpserver runs on iCub laptop)

The last command writes the information of the YARP server located on iCub laptop into the file specified by yarp conf, which is typically /home/icub/.config/yarp/_icub.conf. Warning: that command overwrites previous content.

  • tuning and optimization
  1. make sure that CMAKE_BUILD_TYPE=Release for both yarp and icub-main
  2. cat /proc/sys/net/core/rmem_max // should return 8388608

Updating

In addition to yarp and icub-main, icub-firmware-shared must also be updated (these are scripts, not the firmware itself). In order to update the firmware, use the binaries in icub-firmware-build and follow the official iCub manual.

See also