当前位置: 首页 > 工具软件 > Player/Stage > 使用案例 >

Player /Stage Installed on Ubuntu 7.04|Player-2.0.4在Ubuntu 7.0.4下的安装

夏兴生
2023-12-01

这里把Player 安装过程中需要用到的命令写到bash脚本中执行。


#!/bin/bash

#This script installs the packages required by player and stage,
#downloads and unzips player and stage, and installs both.
#The script is tested in Ubuntu (version 7.04 - Feisty Fawn)
#Created 01/10-08 by MS

#If you are using a proxy server, set it up first
#export http_proxy=http://<proxyserver>:<port>

#Update ubuntu installation
sudo apt-get update
sudo apt-get upgrade

#Install the necessary dependencies

sudo apt-get install autotools-dev build-essential cpp libboost-dev libboost-thread-dev libboost-thread1.33.1 libboost-signals-dev libboost-signals1.33.1 libltdl3 libltdl3-dev libgnomecanvas2-0 libgsl0 libgsl0-dev libgtk2.0-dev libjpeg62-dev libtool swig

#Download the installation files
cd ~
mkdir playerstage_download
cd playerstage_download

wget http://dfn.dl.sourceforge.net/sourceforge/playerstage/player-2.0.4.tar.bz2
wget http://dfn.dl.sourceforge.net/sourceforge/playerstage/stage-2.0.3.tar.bz2

tar xjvf player-2.0.4.tar.bz2
tar xjvf stage-2.0.3.tar.bz2

#Configure and install player and stage in the $user/playerstage directory
cd player-2.0.4

./configure --prefix=/home/$USER/playerstage

make
make install

cd ..
cd stage-2.0.3

./configure --prefix=/home/$USER/playerstage
make
make install

#It is also possible to download and install the debian package by
#The package needs to be downloaded first, and then installed by:
#sudo dpkg -i player_2.0.4-thjc1_i386.deb

#Setting the path be appending to .bashrc
echo "" >> ~/.bashrc
echo "export PATH=/"/$PATH:/home/$USER/playerstage/bin/"" >> ~/.bashrc
echo "export PLAYERPATH=/"/$PATH:/home/$USER/playerstage/share/stage/worlds/"" >> ~/.bashrc

source ~/.bashrc

#Checking if the colour description file is at the right place
if [ -f /usr/X11R6/lib/X11/rgb.txt ];
then
echo
else
echo "/usr/X11R6/lib/X11/rgb.txt does not exist - creating a symbolic link"
sudo ln -s /usr/lib/X11/rgb.txt /usr/X11R6/lib/X11/rgb.txt
fi

#Remove installation files
echo "Removing installation files"

cd ~
rm -rf playerstage_download
echo "Done installing player and stage"

#To test the installation the following can be used:
#
#Start stage
#player ~/playerstage/share/stage/worlds/simple.cfg
#Start a simulation
#~/playerstage/share/player/examples/libplayerc++/./laserobstacleavoid
#

#Here is an other test
#stest playerstage/share/stage/worlds/simple.world robot1

Cited from:
http://www.control.aau.dk/~ms/playerstage/playerstage_install
 类似资料: