Comments (2)
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
from linorobot.
You guys are amazing, thank you.
from linorobot.
Related Issues (20)
- firmware not finding lino_msgs/Velocities.h HOT 2
- Big wheel low RPM speed calculation problem
- laser inflation during angular moment HOT 2
- How do I change mapping of SDA and SCL pins for IMU?
- ROS Noetic (Ubuntu 20) HOT 1
- ModuleNotFoundError: No module named 'glib' HOT 2
- Using IMU BNO055 Sensor
- gazebo model for linorobot
- Is it possible to use 1 pwm and 1 dir driven driver in linorobot
- Changing Frequency of PWM Signal
- rplidar a3
- motor driver Model X motor drive module HOT 1
- Rebuild Inst.h from Inst.msg so that platformio sees it HOT 1
- linorobot comparability with teensy LC
- Robot h/w-related questions...
- rosserial error
- scan data infilation
- Need Two Encoders on The Wheels for ACKERMANN1?
- Need adding few Ultrasound Sensors to linorobot2 - humble to avoid obstructions above the LIDAR raytrace
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linorobot.