Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install script doesn't complete and gives "Python 3.6 or greater required" error #69

Closed
andrewrgross opened this issue Aug 19, 2021 · 2 comments

Comments

@andrewrgross
Copy link

During installation on a Jetson Nano running Ubuntu 18.4, the install script gave this error. Collectively, a group of us worked around it by editing the install script to remove lines that seemed to cause the problem that weren't relevant to our project.

@andrewrgross
Copy link
Author

Here is our edited install file:

#!/usr/bin/env bash

set -e

source /opt/ros/$(dir /opt/ros)/setup.bash

sudo cp files/49-teensy.rules /etc/udev/rules.d/

ROSDISTRO="$(rosversion -d)"
BASE=$1
SENSOR=$2
ARCH="$(uname -m)"
echo $ARCH
echo "
______ _____________   _________ ________ _______ ________ _______ ________
___  / ____  _/___  | / /__  __ \___  __ \__  __ \___  __ )__  __ \___  __/
__  /   __  /  __   |/ / _  / / /__  /_/ /_  / / /__  __  |_  / / /__  /   
_  /_____/ /   _  /|  /  / /_/ / _  _, _/ / /_/ / _  /_/ / / /_/ / _  /    
/_____//___/   /_/ |_/   \____/  /_/ |_|  \____/  /_____/  \____/  /_/     
                    
                            http://linorobot.org                                                                          
"
if [ "$3" != "test" ]
    then
        if [ "$*" == "" ]
            then
                echo "No arguments provided"
                echo
                echo "Example: $ ./install.sh 2wd xv11"
                echo
                exit 1
                
        elif [[ "$1" != "2wd" && "$1" != "4wd" && "$1" != "mecanum" && "$1" != "ackermann" ]]
            then
                echo "Invalid linorobot base: $1"
                echo
                echo "Valid Options:"
                echo "2wd"
                echo "4wd"
                echo "ackermann"
                echo "mecanum"
                echo
                exit 1

        elif [[ "$2" != "xv11" && "$2" != "rplidar" && "$2" != "ydlidar" && "$2" != "hokuyo" && "$2" != "kinect" && "$2" != "realsense" ]]
            then
                echo "Invalid linorobot sensor: $2"
                echo
                echo "Valid Options:"
                echo "hokuyo"
                echo "kinect"
                echo "lms1xx"
                echo "realsense"
                echo "rplidar"
                echo "xv11"
                echo "ydlidar"
                echo
                exit 1
        
        elif [[ "$ARCH" != "x86_64" && "$2" == "realsense" ]]
            then
                echo "Intel Realsense R200 is not supported in $ARCH architecture."
                exit 1

        fi

        echo
        echo -n "You are installing ROS-$ROSDISTRO Linorobot for $BASE base with a $SENSOR sensor. Enter [y] to continue. " 
        read reply
        if [[ "$reply" != "y" && "$reply" != "Y" ]]
            then
                echo "Wrong input. Exiting now"
                exit 1
        fi
fi

echo
echo "INSTALLING NOW...."
echo

sudo apt-get update
sudo apt-get install -y \
avahi-daemon \
openssh-server \
python-setuptools \
python-dev \
build-essential


source /opt/ros/$ROSDISTRO/setup.bash

cd $HOME
mkdir -p linorobot_ws/src
cd $HOME/linorobot_ws/src
catkin_init_workspace

if [ $ROSDISTRO == "melodic" ]
    then
        git clone https://github.com/ros-perception/openslam_gmapping.git
        
else
    sudo apt-get install -y \
    python-gudev \
    ros-$ROSDISTRO-gmapping \
    ros-$ROSDISTRO-map-server
fi

cd $HOME/linorobot_ws/
catkin_make
source devel/setup.bash

sudo apt-get install -y \
ros-$ROSDISTRO-roslint \
ros-$ROSDISTRO-rosserial \
ros-$ROSDISTRO-rosserial-arduino \
ros-$ROSDISTRO-imu-filter-madgwick \
ros-$ROSDISTRO-navigation \
ros-$ROSDISTRO-robot-localization \
ros-$ROSDISTRO-tf2 \
ros-$ROSDISTRO-tf2-ros 

if [[ "$3" == "test" ]]
    then
        sudo apt-get install -y \
        ros-$ROSDISTRO-xv-11-laser-driver \
        ros-$ROSDISTRO-rplidar-ros \
        ros-$ROSDISTRO-urg-node \
        ros-$ROSDISTRO-depthimage-to-laserscan \
        ros-$ROSDISTRO-teb-local-planner 
#         ros-$ROSDISTRO-camera-info-manager \
#         libusb-dev
#         cd $HOME
#         git clone https://github.com/OpenKinect/libfreenect.git    
#         cd libfreenect    
#         mkdir build   
#         cd build    
#         cmake -L ..    
#         make
#         sudo make install
        
        cd $HOME/linorobot_ws/src
        git clone https://github.com/EAIBOT/ydlidar.git
#         git clone https://github.com/ros-drivers/freenect_stack.git
        git clone https://github.com/clearpathrobotics/lms1xx.git
else
    if [[ "$SENSOR" == "hokuyo" ]]
        then
            sudo apt-get install -y ros-$ROSDISTRO-urg-node
            hokuyoip=
            echo ""
            echo -n "Input your hokuyo IP. Press Enter to skip (Serial Based LIDAR): "
            read hokuyoip
            echo "export LIDARIP=$hokuyoip" >> $HOME/.bashrc

    elif [[ "$SENSOR" == "kinect" ]]
        then
            cd $HOME/linorobot_ws/src
            git clone https://github.com/ros-drivers/freenect_stack.git
            sudo apt-get install -y \
            ros-$ROSDISTRO-depthimage-to-laserscan \
            ros-$ROSDISTRO-camera-info-manager     
            git clone https://github.com/OpenKinect/libfreenect.git    
            cd libfreenect    
            mkdir build   
            cd build    
            cmake -L ..    
            make
            sudo make install
          
    elif [[ "$SENSOR" == "lms1xx" ]]
        then
            cd $HOME/linorobot_ws/src
            git clone https://github.com/clearpathrobotics/lms1xx.git
            echo ""
            echo -n "Input your LMS1xx IP: "
            read lms1xxip
            echo "export LIDARIP=$lms1xxip" >> $HOME/.bashrc

    elif [[ "$SENSOR" == "realsense" ]]
        then
            sudo apt-get install -y ros-$ROSDISTRO-realsense-camera
            sudo apt-get install -y ros-$ROSDISTRO-depthimage-to-laserscan

    elif [[ "$SENSOR" == "rplidar" ]]
        then
            sudo apt-get install -y ros-$ROSDISTRO-rplidar-ros

    elif [[ "$SENSOR" == "xv11" ]]
        then
            sudo apt-get install -y ros-$ROSDISTRO-xv-11-laser-driver

    elif [[ "$SENSOR" == "ydlidar" ]]
        then
            cd $HOME/linorobot_ws/src
            git clone https://github.com/EAIBOT/ydlidar.git
    fi

    if [[ "$BASE" == "ackermann" ]]
        then
            sudo apt-get install -y ros-$ROSDISTRO-teb-local-planner
    fi
fi

cd $HOME/linorobot_ws/
catkin_make

cd $HOME/linorobot_ws/src
git clone https://github.com/linorobot/linorobot.git
git clone https://github.com/linorobot/imu_calib.git
git clone https://github.com/linorobot/lino_pid.git
git clone https://github.com/linorobot/lino_udev.git
git clone https://github.com/linorobot/lino_msgs.git

cd $HOME/linorobot_ws/src/linorobot
TRAVIS_BRANCH="echo $TRAVIS_BRANCH"
if [ "$TRAVIS_BRANCH" = "devel" ]; then git checkout devel; fi

echo "source $HOME/linorobot_ws/devel/setup.bash" >> $HOME/.bashrc
echo "export LINOLIDAR=$SENSOR" >> $HOME/.bashrc
echo "export LINOBASE=$BASE" >> $HOME/.bashrc
source $HOME/.bashrc

cd $HOME/linorobot_ws
catkin_make

echo
echo "INSTALLATION DONE!"
echo

@knnurl
Copy link

knnurl commented Aug 26, 2022

You guys are amazing, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants