diff --git a/install/dfall_install_git_clone_and_catkin_make.sh b/install/dfall_install_git_clone_and_catkin_make.sh new file mode 100644 index 0000000000000000000000000000000000000000..58c5aa22d8a776242e17eb85ec714fe2fa5358ef --- /dev/null +++ b/install/dfall_install_git_clone_and_catkin_make.sh @@ -0,0 +1,63 @@ +# --------------------------------------------------------------- # +# CLONE THE D-FaLL-System REPOSITORY + +# Make the "work" directory under the users root +# > Note: the -p option means: no error if existing, make parent directories as needed +mkdir -p ~/work + +# Change directory to this folder +cd ~/work + +# Install git +sudo apt -y install git + +# Clone the D-FaLL-System git repository +git clone https://gitlab.ethz.ch/D-FaLL/PandS-System/D-FaLL-System.git + + + +# --------------------------------------------------------------- # +# CREATE, COPY, EDIT A FEW NECESSARY FILES +# > NOTE: the "man sh" explain that the -c option specifies "sh" to: +# "Read commands from the command_string operand instead of from the standard input. + +# Add the teacher's IP address to the /etc/hosts file +sudo sh -c "echo '10.42.0.10 dfallmaster' >> /etc/hosts" + +# Add a new file with the default agent ID +sudo sh -c "echo $1 >> /etc/dfall_default_agent_id" + +# Add a new file with the default coordinator ID +sudo sh -c "echo 1 >> /etc/dfall_default_coord_id" + +# Copy rules necessary for using the Crazyradio +sudo cp ~/work/D-FaLL-System/install/99-crazyflie.rules /etc/udev/rules.d +sudo cp ~/work/D-FaLL-System/install/99-crazyradio.rules /etc/udev/rules.d + + + +# --------------------------------------------------------------- # +# BUILD THE D-FaLL-System ROS PACKAGE +# > NOTE: This is done by calling "catkin_make" from the folder "dfall_ws", +# where "ws" stands for workspace +# > NOTE: the package that is built is named "dfall_pkg", as specified in the file +# .../dfall_ws/src/dfall_pkg/package.xml +# > NOTE: the -j4 option specifies the: Maximum number of build jobs to be +# distributed across active packages. (default is cpu count) +cd ~/work/D-FaLL-System/dfall_ws +catkin_make + + + +# --------------------------------------------------------------- # +# ADD TO THE .bashrc THE D-FaLL-System CONFIG AND ROS PACKAGE SETUP + +# Add the D-FaLL ROS Package setup to the .bashrc +echo "source ~/work/D-FaLL-System/dfall_ws/devel/setup.bash" >> ~/.bashrc +# And run it now so that it is valid for this terminal session +source ~/work/D-FaLL-System/dfall_ws/devel/setup.bash + +# Add the "Config.sh" shell script to the .bashrc +echo "source ~/work/D-FaLL-System/dfall_ws/src/dfall_pkg/launch/Config.sh" >> ~/.bashrc +# And run it now so that it is valid for this terminal session +source ~/work/D-FaLL-System/dfall_ws/src/dfall_pkg/launch/Config.sh diff --git a/install/dfall_install_ros_keys.sh b/install/dfall_install_ros_keys.sh new file mode 100644 index 0000000000000000000000000000000000000000..06bd83929158b50f82d59265acc9226a243c2ab0 --- /dev/null +++ b/install/dfall_install_ros_keys.sh @@ -0,0 +1,10 @@ +# --------------------------------------------------------------- # +# ADD ROS PACKAGE SERVER AND KEY AS PER: +# http://wiki.ros.org/melodic/Installation/Ubuntu + +# Setup the computer to accept software from packages.ros.org +sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' + +# Setup the keys +#sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116 +sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 \ No newline at end of file diff --git a/install/dfall_install_ros_kinetic_ubuntu16.sh b/install/dfall_install_ros_kinetic_ubuntu16.sh index 00fc56e91d4a6741c9bb5928dc7d696fc680f67a..b4e209dd52fb7f4d637cb67ec354bc66c006d015 100755 --- a/install/dfall_install_ros_kinetic_ubuntu16.sh +++ b/install/dfall_install_ros_kinetic_ubuntu16.sh @@ -33,7 +33,8 @@ echo $1 | grep -E -q '^[0-9]+$' || die "Numeric argument required, $1 provided" sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' # Setup the keys -sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116 +#sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116 +sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 # Update the package index, i.e., the list of programs sudo apt-get update @@ -46,6 +47,10 @@ sudo apt-get -y upgrade # > Note: we use the configuration: "Desktop-Full Install: (Recommended)" sudo apt-get -y install ros-kinetic-desktop-full +# > Note: for installing on a "headless" operating system, i.e., a Raspberry Pi +# without a graphical desktop, use the configuration: "ROS-Base: (Bare Bones)" +#sudo apt -y install ros-kinetic-ros-base + # Initialise and update rosdep # > Note: rosdep enables you to easily install system dependencies for source you want to compile and is required to run some core components in ROS sudo rosdep init diff --git a/install/dfall_install_ros_melodic_ubuntu18.sh b/install/dfall_install_ros_melodic_ubuntu18.sh index 86163c1c9af989a6e40202d32676b676b960683c..ef4e2c971bc31c047aff624faf7474eef79ec490 100755 --- a/install/dfall_install_ros_melodic_ubuntu18.sh +++ b/install/dfall_install_ros_melodic_ubuntu18.sh @@ -33,7 +33,8 @@ echo $1 | grep -E -q '^[0-9]+$' || die "Numeric argument required, $1 provided" sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' # Setup the keys -sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116 +#sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116 +sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 # Update the package index, i.e., the list of programs sudo apt update @@ -46,6 +47,10 @@ sudo apt -y upgrade # > Note: we use the configuration: "Desktop-Full Install: (Recommended)" sudo apt -y install ros-melodic-desktop-full +# > Note: for installing on a "headless" operating system, i.e., a Raspberry Pi +# without a graphical desktop, use the configuration: "ROS-Base: (Bare Bones)" +#sudo apt -y install ros-melodic-ros-base + # Initialise and update rosdep # > Note: rosdep enables you to easily install system dependencies for source you want to compile and is required to run some core components in ROS sudo rosdep init