Changeset 469 in flair-src


Ignore:
Timestamp:
03/10/22 10:50:29 (4 months ago)
Author:
Sanahuja Guillaume
Message:

change all scripts to remove call to distribution_specific_hack, which is no longer necessary

Location:
trunk
Files:
41 edited
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/ReleaseNotes

    r450 r469  
    11* Actual Version:
    22
     3- changed scripts for demos; using sudo is no longer necessary
     4- changed usb method for ds3; using sudo is no longer necessary
    35- added possibility to autodetect gcs ip when using autodetect as address parameter, see demos. This only works when ssh connected to a target (not in simulation)
    46- graphs are now synchronized on gcs
  • trunk/demos/CircleFollower/simulator/resources/core2-64/simulator_x4.sh

    r302 r469  
    66fi
    77
    8 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    9 
    108$EXEC -n x4_0 -t x4 -p 9000 -a 127.0.0.1 -x simulator_x4.xml -o 10 -m $FLAIR_ROOT/flair-src/models -s $FLAIR_ROOT/flair-src/models/indoor_flight_arena.xml
  • trunk/demos/CircleFollower/simulator/resources/core2-64/simulator_x8.sh

    r302 r469  
    11#! /bin/bash
    2 
    3 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    42
    53if [ -f /proc/xenomai/version ];then
  • trunk/demos/CircleFollower/uav/resources/core2-64/x4.sh

    r302 r469  
    77fi
    88
    9 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    10 
    119$EXEC -n x4_0 -a 127.0.0.1 -p 9000 -l /tmp -x setup_x4.xml -t x4_simu
  • trunk/demos/CircleFollower/uav/resources/core2-64/x4_intelaero.sh

    r423 r469  
    77fi
    88
    9 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    10 
    119$EXEC -n x4_0 -a 172.26.213.62 -p 9000 -l /tmp -x setup_x4_intelaero.xml -t aero
  • trunk/demos/CircleFollower/uav/resources/core2-64/x8.sh

    r302 r469  
    77fi
    88
    9 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    10 
    119$EXEC -n x8_0 -a 127.0.0.1 -p 9000 -l ./ -x setup_x8.xml -t x8_simu
  • trunk/demos/DemoGps/simulator/resources/core2-64/simulator_x4.sh

    r405 r469  
    77fi
    88
    9 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    10 
    119$EXEC -n x4_0 -t x4 -p 9000 -a 127.0.0.1 -x simulator_x4.xml -o 10 -m $FLAIR_ROOT/flair-src/models -s $FLAIR_ROOT/flair-src/models/indoor_flight_arena.xml
  • trunk/demos/DemoGps/simulator/resources/core2-64/simulator_x8.sh

    r405 r469  
    77fi
    88
    9 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    10 
    119$EXEC -n x8_0 -t x8 -p 9000 -a 127.0.0.1 -x simulator_x8.xml -o 10 -m $FLAIR_ROOT/flair-src/models -s $FLAIR_ROOT/flair-src/models/indoor_flight_arena.xml
  • trunk/demos/DemoGps/uav/resources/core2-64/x4.sh

    r405 r469  
    77fi
    88
    9 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    10 
    119$EXEC -n x4_0 -a 127.0.0.1 -p 9000 -l /tmp -x setup_x4.xml -t x4_simu
  • trunk/demos/DemoGps/uav/resources/core2-64/x8.sh

    r302 r469  
    77fi
    88
    9 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    10 
    119$EXEC -n x8_0 -a 127.0.0.1 -p 9000 -l ./ -x setup_x8.xml -t x8_simu
  • trunk/demos/DemoOpticalFlow/simulator/resources/core2-64/simulator_x4.sh

    r405 r469  
    77fi
    88
    9 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    10 
    119$EXEC -n x4_0 -t x4 -a 127.0.0.1 -p 9000 -x simulator_x4.xml -o 10 -m $FLAIR_ROOT/flair-src/models -s $FLAIR_ROOT/flair-src/models/indoor_flight_arena.xml
  • trunk/demos/DemoOpticalFlow/simulator/resources/core2-64/simulator_x8.sh

    r405 r469  
    77fi
    88
    9 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    10 
    119$EXEC -n x8_0 -t x8 -a 127.0.0.1 -p 9000 -x simulator_x8.xml -o 10 -m $FLAIR_ROOT/flair-src/models -s $FLAIR_ROOT/flair-src/models/indoor_flight_arena.xml
  • trunk/demos/DemoOpticalFlow/uav/resources/core2-64/x4.sh

    r405 r469  
    77fi
    88
    9 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    10 
    119$EXEC -n x4_0 -a 127.0.0.1 -p 9000 -l /tmp -x setup_x4.xml -t x4_simu -v dsp_stub
  • trunk/demos/DemoOpticalFlow/uav/resources/core2-64/x8.sh

    r405 r469  
    77fi
    88
    9 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    10 
    119$EXEC -n x8_0 -a 127.0.0.1 -p 9000 -l /tmp -x setup_x8.xml -t x8_simu -v dsp_stub
  • trunk/demos/MixedReality/real/simulator/resources/core2-64/simulator_x4.sh

    r302 r469  
    66fi
    77
    8 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    9 
    108$EXEC -p 9000 -a 127.0.0.1 -x simulator_x4.xml -o 10 -m $FLAIR_ROOT/flair-src/models -s $FLAIR_ROOT/flair-src/models/indoor_flight_arena.xml
  • trunk/demos/MixedReality/real/uav/resources/core2-64/x4.sh

    r404 r469  
    77fi
    88
    9 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    10 
    119$EXEC -a 127.0.0.1 -p 9000 -l /tmp -x setup_x4.xml -t x4_simu0 -v 127.0.0.1:3884 -d 20010
  • trunk/demos/MixedReality/virtual/simulator/resources/core2-64/simulator_x4.sh

    r302 r469  
    66fi
    77
    8 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    9 
    108$EXEC -p 9000 -a 127.0.0.1 -x simulator_x4.xml -o 10 -m $FLAIR_ROOT/flair-src/models -s $FLAIR_ROOT/flair-src/models/indoor_flight_arena.xml -v 127.0.0.1:3883
  • trunk/demos/MixedReality/virtual/uav/resources/core2-64/x4.sh

    r404 r469  
    77fi
    88
    9 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    10 
    119$EXEC -a 127.0.0.1 -p 9000 -l /tmp -x setup_x4.xml -t x4_simu1
  • trunk/demos/PidStandalone/simulator/resources/core2-64/simulator_x4.sh

    r302 r469  
    77fi
    88
    9 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    10 
    119$EXEC -n x4_0 -t x4 -a 127.0.0.1 -p 9000 -x simulator_x4.xml -o 10 -m $FLAIR_ROOT/flair-src/models -s $FLAIR_ROOT/flair-src/models/indoor_flight_arena.xml
  • trunk/demos/PidStandalone/simulator/resources/core2-64/simulator_x8.sh

    r302 r469  
    77fi
    88
    9 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    10 
    119$EXEC  -n x8_0 -t x8 -a 127.0.0.1 -p 9000 -x simulator_x8.xml -o 10 -m $FLAIR_ROOT/flair-src/models -s $FLAIR_ROOT/flair-src/models/indoor_flight_arena.xml
  • trunk/demos/PidStandalone/uav/resources/core2-64/x4.sh

    r302 r469  
    66fi
    77
    8 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    9 
    108$EXEC -n x4_0 -a 127.0.0.1 -p 9000 -l ./ -x setup_x4.xml -t x4_simu $*
  • trunk/demos/PidStandalone/uav/resources/core2-64/x8.sh

    r302 r469  
    77fi
    88
    9 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    10 
    119$EXEC -n x8_0 -a 127.0.0.1 -p 9000 -l ./ -x setup_x8.xml -t x8_simu
  • trunk/demos/SimpleFleet/simulator/resources/core2-64/simulator_x4.sh

    r333 r469  
    77fi
    88
    9 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    10 
    119$EXEC -n x4 -a 127.0.0.1 -p 9000 -x simulator_x4.xml -o 10 -m $FLAIR_ROOT/flair-src/models -s $FLAIR_ROOT/flair-src/models/indoor_flight_arena.xml -t x4
  • trunk/demos/SimpleFleet/simulator/resources/core2-64/simulator_x8.sh

    r333 r469  
    77fi
    88
    9 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    10 
    119$EXEC -n x8 -a 127.0.0.1 -p 9000 -x simulator_x8.xml -o 10 -m $FLAIR_ROOT/flair-src/models -s $FLAIR_ROOT/flair-src/models/indoor_flight_arena.xml -t x8
  • trunk/demos/SimpleFleet/uav/resources/core2-64/x4_0.sh

    r333 r469  
    77fi
    88
    9 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    10 
    119$EXEC -n x4_0 -a 127.0.0.1 -p 9000 -l ./ -x setup_x4.xml -t x4_simu0 -b 127.255.255.255:20010
  • trunk/demos/SimpleFleet/uav/resources/core2-64/x4_1.sh

    r333 r469  
    77fi
    88
    9 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    10 
    119$EXEC -n x4_1 -a 127.0.0.1 -p 9000 -l ./ -x setup_x4.xml -t x4_simu1 -b 127.255.255.255:20010 -d 21000
  • trunk/demos/SimpleFleet/uav/resources/core2-64/x8_0.sh

    r302 r469  
    77fi
    88
    9 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    10 
    119$EXEC -n x8_0 -a 127.0.0.1 -p 9000 -l ./ -x setup_x8.xml -t x8_simu0 -b 127.255.255.255:20010
  • trunk/demos/SimpleFleet/uav/resources/core2-64/x8_1.sh

    r302 r469  
    77fi
    88
    9 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    10 
    119$EXEC -n x8_1 -a 127.0.0.1 -p 9000 -l ./ -x setup_x8.xml -t x8_simu1 -b 127.255.255.255:20010 -d 21000
  • trunk/demos/Sinus/resources/core2-64/Sinus.sh

    r302 r469  
    66fi
    77
    8 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    9 
    108$EXEC
    11 
  • trunk/demos/TwoWheelRobotCircleFollower/simulator/resources/core2-64/simulator.sh

    r371 r469  
    66fi
    77
    8 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    9 
    108$EXEC -n ugv_0 -p 9000 -a 127.0.0.1 -x simulator.xml -o 10 -m $FLAIR_ROOT/flair-src/models -s $FLAIR_ROOT/flair-src/models/indoor_flight_arena.xml
  • trunk/demos/TwoWheelRobotCircleFollower/ugv/resources/core2-64/ugv_simu.sh

    r378 r469  
    77fi
    88
    9 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    10 
    119$EXEC -n ugv_0 -t ugv_simu -a 127.0.0.1 -p 9000 -l /tmp -x setup_simu.xml
  • trunk/demos/TwoWheelRobotCircleFollower/ugv/resources/core2-64/ugv_sumo.sh

    r378 r469  
    77fi
    88
    9 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    10 
    119$EXEC -n ugv_0 -t sumo -a 127.0.0.1 -p 9000 -l /tmp -x setup_sumo.xml
  • trunk/demos/TwoWheelRobotSimpleFleet/simulator/resources/core2-64/simulator.sh

    r390 r469  
    66fi
    77
    8 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    9 
    108$EXEC -n ugv -p 9000 -a 127.0.0.1 -x simulator.xml -o 10 -m $FLAIR_ROOT/flair-src/models -s $FLAIR_ROOT/flair-src/models/indoor_flight_arena.xml
  • trunk/demos/TwoWheelRobotSimpleFleet/ugv/resources/core2-64/ugv_simu0.sh

    r390 r469  
    77fi
    88
    9 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    10 
    119$EXEC -n ugv_0 -t ugv_simu0 -a 127.0.0.1 -p 9000 -l /tmp -x setup_simu0.xml -b 127.255.255.255:20010
  • trunk/demos/TwoWheelRobotSimpleFleet/ugv/resources/core2-64/ugv_simu1.sh

    r390 r469  
    77fi
    88
    9 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    10 
    119$EXEC -n ugv_1 -t ugv_simu1 -a 127.0.0.1 -p 9000 -l /tmp -x setup_simu1.xml -b 127.255.255.255:20010 -d 21000
  • trunk/demos/TwoWheelRobotSimpleFleet/ugv/resources/core2-64/ugv_sumo0.sh

    r390 r469  
    77fi
    88
    9 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    10 
    119$EXEC -n ugv_0 -t sumo -a 127.0.0.1 -p 9000 -l /tmp -x setup_sumo0.xml -b 172.26.223.255:20010
  • trunk/demos/TwoWheelRobotSimpleFleet/ugv/resources/core2-64/ugv_sumo1.sh

    r390 r469  
    77fi
    88
    9 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    10 
    119$EXEC -n ugv_1 -t sumo -a 127.0.0.1 -p 9000 -l /tmp -x setup_sumo1.xml -b 172.26.223.255:20010
  • trunk/scripts/distribution_specific_hack.sh

    r365 r469  
    1 #check required version of a lib in host graphic lib (ie i965)
    2 #return 1 if robomap3 version is not sufficient
    3 function check_required_lib_ver () {
    4     DRIVER_LIB=$1       
    5     PATTERN=$2
    6     LIB=$3
     1#!/bin/bash
    72
    8     #get the highest required version of $PATTERN
    9     VER_REQUIRED=$(objdump -T $DRIVER_LIB | grep $PATTERN | sed -e 's/.*'$PATTERN'_\(.*\) .*/\1/' | sort -uV | tail -1)
    10     #get currently used $LIB
    11     LIB_PROVIDED=$(ldd $EXEC | grep $LIB | sed -e 's/.*=> \(.*\) (.*/\1/')
    12     #get the highest version of $PATTERN supported by the $LIB
    13     VER_PROVIDED=$(objdump -T $LIB_PROVIDED | grep ".*"$PATTERN"_[0-9.]*$" | sed -e 's/.*'$PATTERN'_\(.*\)/\1/' | sort -V | tail -1)
    14     if [ $(echo -e "$VER_PROVIDED\n$VER_REQUIRED" | sort -V | tail -n1) != $VER_PROVIDED ]; then
    15         echo "We must use the local system $LIB"
    16         return 1
    17     fi
     3function red_echo () {
     4        echo -e "\033[33m$1\033[0m"
    185}
    196
    20 function green_echo () {
    21         echo -e "\033[32m$1\033[0m"
    22 }
    23 
    24 if [ -f /etc/lsb-release ]; then
    25   . /etc/lsb-release
    26 fi
    27 
    28 #also needed in mint, but for different reason?
    29 #if not in sudo in mint, simlator does not work cause of:
    30 #libGL: MESA-LOADER: failed to open /usr/lib/x86_64-linux-gnu/dri/iris_dri.so: /usr/lib/x86_64-linux-gnu/dri/iris_dri.so: failed to map segment from shared object
    31 
    32 #if [ _$DISTRIB_ID = _Ubuntu ]; then
    33   #tested on Ubuntu 17.10
    34   #we must run as root
    35   if [ $EUID -ne 0 ]; then
    36     exec sudo -E $0 $*
    37   fi
    38 
    39   #we must run in root cgroup to escape possible restrictions on scheduling
    40   if [ -d /sys/fs/cgroup/cpu ]; then
    41     echo $$ > /sys/fs/cgroup/cpu/tasks
    42   fi
    43 
    44 #fi
    45 
    46 #special actions if we use 3D
    47 ldd $EXEC | grep "libGL.so" > /dev/null
    48 if [ $? -eq 0 ]; then
    49     green_echo "checking for incompatibility when using libGL and trying to solve it..."
    50     #allow root access to the X server
    51     xhost si:localuser:root
    52 
    53     #Mesa DRI driver may need a lib more recent than robomap3's
    54     ldconfig -p | grep mesa > /dev/null
    55     if [ $? -eq 0 ]; then
    56         read DRI_CARD_MAJOR DRI_CARD_MINOR < <(stat -c '%t %T' /dev/dri/card0)
    57         DRIVER=$(cat /sys/dev/char/$((16#$DRI_CARD_MAJOR)):$((16#$DRI_CARD_MINOR))/device/uevent | grep DRIVER | cut -d= -f2)
    58         echo "Mesa DRI driver is $DRIVER"
    59         DRIVER_LIB=$(LIBGL_DEBUG=verbose glxinfo 2>&1 | grep "\.so" | tail -n 1 | grep -o '/.*\.so')
    60 
    61         #todo: make a list, find a complete one!
    62         check_required_lib_ver $DRIVER_LIB GLIBC libm.so.6
    63         if [ "$?" = "1" ]; then
    64                    ADDED_LIBS=$(ldconfig -p | grep libm.so.6 | grep libc6,x86-64 | cut -d'>' -f2)
    65             fi
    66 
    67         check_required_lib_ver $DRIVER_LIB CXXABI libstdc++.so.6
    68         if [ "$?" = "1" ]; then
    69                    ADDED_LIBS="$ADDED_LIBS:$(ldconfig -p | grep libstdc++.so.6 | grep libc6,x86-64 | cut -d'>' -f2)"
    70             fi
    71 
    72         #remove whitespace
    73         #add libs to LD_PRELOAD if version robomap3 version is not sufficient
    74         export LD_PRELOAD="$(echo -e "${ADDED_LIBS}" | tr -d '[:space:]')"
    75     fi
    76 
    77     #check if using DRI3 and disable it
    78     #otherwise you get /usr/lib/x86_64-linux-gnu/libGLX_mesa.so.0: undefined symbol: xcb_dri3_get_supported_modifiers
    79     cat /var/log/Xorg.0.log | grep DRI3 > /dev/null
    80     if [ $? -eq 0 ]; then
    81         export LIBGL_DRI3_DISABLE=1
    82         echo "we must disable DRI3"
    83     fi
    84     green_echo "...done\n"
    85 fi
    86 
    87 
    88 
     7red_echo "Calling distribution_specific_hack.sh is no longer necessary; this script now does nothing"
     8red_echo "If you encounter problems running your program, call the distribution_specific_hack_compat.sh script and warn a Flair developer\n"
  • trunk/scripts/distribution_specific_hack_compat.sh

    r467 r469  
    2121        echo -e "\033[32m$1\033[0m"
    2222}
     23
     24function red_echo () {
     25        echo -e "\033[33m$1\033[0m"
     26}
     27
     28red_echo "Calling distribution_specific_hack_compat.sh should not be necessary; try without it or warn a Flair developer"
     29red_echo "This script will be removed in future releases\n"
    2330
    2431if [ -f /etc/lsb-release ]; then
  • trunk/scripts/ubuntu_cgroup_hack.sh

    r306 r469  
    1 if [ -f /etc/lsb-release ]; then
    2   . /etc/lsb-release
    3 fi
     1#!/bin/bash
    42
    5 if [ _$DISTRIB_ID == _Ubuntu ]; then
    6   #we must run as root
    7   if [ $EUID -ne 0 ]; then
    8     exec sudo -E $0 $*
    9   fi
     3function red_echo () {
     4        echo -e "\033[33m$1\033[0m"
     5}
    106
    11   #we must run in root cgroup to escape possible restrictions on scheduling
    12   if [ -d /sys/fs/cgroup/cpu ]; then
    13     echo $$ > /sys/fs/cgroup/cpu/tasks
    14   fi
    15 fi
    167
     8red_echo "Calling ubuntu_cgroup_hack.sh is no longer necessary; this script now does nothing"
     9red_echo "If you encounter problems running your program, call the ubuntu_cgroup_hack_compat.sh script and warn a Flair developer"
  • trunk/scripts/ubuntu_cgroup_hack_compat.sh

    r467 r469  
     1function red_echo () {
     2        echo -e "\033[33m$1\033[0m"
     3}
     4
    15if [ -f /etc/lsb-release ]; then
    26  . /etc/lsb-release
     
    1519fi
    1620
     21red_echo "Calling distribution_specific_hack_compat.sh should not be necessary; try without it or warn a Flair developer"
     22red_echo "This script will be removed in future releases\n"
  • trunk/tools/Controller/DualShock3/resources/core2-64/dualshock3.sh

    r467 r469  
    77done
    88
    9 . ${FLAIR_ROOT}/flair-src/scripts/ubuntu_cgroup_hack.sh
    10 
    119${FLAIR_ROOT}/flair-install/bin/tools/$ARCH_DIR/dualshock3 $*
  • trunk/tools/VrpnLite/resources/core2-64/vrpnlite.sh

    r467 r469  
    22ARCH_DIR=core2-64
    33
    4 . ${FLAIR_ROOT}/flair-src/scripts/ubuntu_cgroup_hack.sh
    5 
    64${FLAIR_ROOT}/flair-install/bin/tools/$ARCH_DIR/vrpnlite -p 9000 -x vrpnlite.xml -s 172.26.213.1:3883 -v 3884
    75
Note: See TracChangeset for help on using the changeset viewer.