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

安装player/stage

桂丰
2023-12-01

摸索了好几天,试过了很多种方法,很多次失败,嘿嘿,当然,当我写这篇博客的时候,我已经安装好了,下面介绍一下我安装的过程。

我的系统是 ubuntu 11.10 ,player/stage 是一个机器人模拟系统,其实他包括player和stage两个部分,我感觉player是用来控制机器人运动的,就跟他的名字一样,相当于一个机器人运动的播放器,嘿嘿,我理解的有点简陋,而stage是模拟系统,可以虚拟的测试机器人的运动性能和控制等,要安装stage首先要安装player。

安装player:

我刚开始安装的player版本是3.0.2,其实他和最新的stage版本4.1是不兼容的,安装stage时会出现错误,所以,要去下载3.1版本的player,地址是“svn co https://playerstage.svn.sourceforge.net/svnroot/playerstage/code/player/trunk/ playersrc ”,在这里使用了svn工具,需要你安装svn工具,sudo apt-get svn ,呵呵,如果不对,就百度下,安装好svn后,输入svn co https://playerstage.svn.sourceforge.net/svnroot/playerstage/code/player/trunk/ playersrc ,就会把最新的player复制在当前目录下,里面的install.txt文件一定要看啊,我就是看着说明文档安装的,在安装player之前,还要安装一些其他软件,一些依赖库等,可能你需要在终端里输入一些命令

sudo apt-get install libxmu-dev
sudo apt-get install libltdl-dev
sudo apt-get install libguile-ltdl-1

安装过程如下:

svn co https://playerstage.svn.sourceforge.net/svnroot/playerstage/code/player/trunk/ playersrc
cd playersrc

mkdir build
cd build
cmake ../

//输入完以上命令后,可能会出现一下结果,那很好,你安装成功了
-- Player version 3.1.0-svn
-- Operating system is Linux
-- Got System Processor i686
-- Player will be installed to /usr/local
-- Headers will be installed to /usr/local/include/player-3.1
-- Libraries will be installed to /usr/local/lib
-- Large file support is disabled.
-- ===== Client Libraries =====
-- SWIG was not found. Please specify Swig executable location
-- Python bindings for C client library will not be built - could not find Swig
-- Could NOT find Ruby (missing: RUBY_EXECUTABLE RUBY_INCLUDE_DIR RUBY_LIBRARY)
-- Ruby bindings for C client library will not be built - could not find Ruby
-- Python bindings for C++ client library will not be built - disabled by user
-- Could NOT find Ruby (missing: RUBY_EXECUTABLE RUBY_INCLUDE_DIR RUBY_LIBRARY)
-- Ruby bindings for C++ client library will not be built - could not find Ruby
-- Could NOT find Boost
-- Boost libraries were not found. Boost::Signals and Boost::Thread support
will not be included in PlayerC++.
-- ============================
--
-- ----- Processing driver make files -----
-- checking for module 'artoolkitplus>=2.1'
-- package 'artoolkitplus>=2.1' not found
-- checking for module 'gstreamer-base-0.10'
-- package 'gstreamer-base-0.10' not found
-- checking for module 'libexif'
-- package 'libexif' not found
-- checking for module 'libusb'
-- package 'libusb' not found
-- checking for module 'libunicap'
-- package 'libunicap' not found
-- checking for module 'libstatgrab'
-- package 'libstatgrab' not found
-- checking for module 'libgarcia'
-- package 'libgarcia' not found
-- checking for module 'libusb-1.0'
-- package 'libusb-1.0' not found
-- checking for module 'GbxSmartBatteryAcfr=1.0.0'
-- package 'GbxSmartBatteryAcfr=1.0.0' not found
-- checking for module 'GbxSickAcfr=1.0.0'
-- package 'GbxSickAcfr=1.0.0' not found
-- checking for module 'howl>=0.9.6'
-- package 'howl>=0.9.6' not found
-- checking for module 'libpqxx'
-- package 'libpqxx' not found
-- checking for module 'libpqxx'
-- package 'libpqxx' not found
-- checking for module 'libnl-1'
-- package 'libnl-1' not found
-- ----- Done -----
--
-- ===== Drivers =====
-- The following drivers will be built:
-- AioToSonar
-- accel_calib
-- acts
-- amcl
-- amtecpowercube
-- aodv
-- bitlogic
-- blobposition
-- blobtodio
-- blobtracker
-- bumper2laser
-- bumpersafe
-- bumpertodio
-- cameracompress
-- camerareq
-- camerauncompress
-- camerauvc
-- camerav4l
-- camerav4l2
-- camfilter
-- canonvcc4
-- clodbuster
-- cmdsplitter
-- cmucam2
-- cmvision
-- create
-- cvcam
-- deadstop
-- differential
-- diocmd
-- diodelay
-- diolatch
-- dummy
-- ekfvloc
-- epuck
-- er1
-- erratic
-- fakelocalize
-- festival
-- flexiport
-- flockofbirds
-- garminnmea
-- gbxgarminacfr
-- globalize
-- goto
-- gridmap
-- gripcmd
-- hemisson
-- hokuyo_aist
-- imageseq
-- imgcmp
-- imgsave
-- inhibitor
-- insideM300
-- iwspy
-- kartowriter
-- khepera
-- laserbar
-- laserbarcode
-- lasercspace
-- lasercutter
-- laserfeature
-- laserposeinterpolator
-- laserptzcloud
-- laserrescan
-- lasersafe
-- lasertoranger
-- linuxjoystick
-- linuxwifi
-- localbb
-- mapcspace
-- mapfile
-- mapscale
-- mbasedriver
-- mbicp
-- mica2
-- microstrain
-- motionmind
-- mricp
-- nd
-- nomad
-- obot
-- opaquecmd
-- p2os
-- passthrough
-- pbslaser
-- portio
-- ptu46
-- rangerposeinterpolator
-- rangertodio
-- rangertolaser
-- readlog
-- relay
-- rflex
-- roboteq
-- robotracker
-- roomba
-- rs4leuze
-- rt3xxx
-- searchpattern
-- segwayrmp400
-- serialstream
-- serio
-- shapetracker
-- sickLDMRS
-- sickRFI341
-- sicklms200
-- sicklms400
-- sicknav200
-- sicks3000
-- simpleshape
-- skyetekM1
-- snd
-- sonartoranger
-- sonyevid30
-- speechcmd
-- sphere
-- sphereptz
-- stalltodio
-- suppressor
-- tcpstream
-- upcbarcode
-- vec2map
-- velcmd
-- vfh
-- videocanny
-- vmapfile
-- wavefront
-- wbr914
-- writelog
--
-- The following drivers will not be built:
-- acr120u - Could not find header usb.h
-- alsa - Could not find header alsa/asoundlib.h
-- amtecm5 - Could not find header Device.h
-- artoolkitplus - Could not find package artoolkitplus
-- camera1394 - Could not find header libraw1394/raw1394.h
-- cameragst - Could not find package gstreamer-base-0.10
-- eedhcontroller - Disabled - probably doesn't build
-- garcia - Could not find package libgarcia
-- gbxsickacfr - Could not find package GbxSickAcfr
-- isense - Could not find header isense/isense.h
-- laservisualbarcode - Has not been updated to use dynamic message structures
-- laservisualbw - Has not been updated to use dynamic message structures
-- nimu - Could not find header usb.h
-- nxt - Could not find package libusb-1.0
-- oceanserver - Could not find package GbxSmartBatteryAcfr
-- phidgetAcc - Could not find libphidget
-- phidgetAcc - Could not find libphidget
-- phidgetifk - Could not find libphidget
-- postgis - Could not find package libpqxx
-- postlog - Could not find package libpqxx
-- powershot - Could not find header libptp2/ptp.h
-- rcore_xbridge - Could not find header libparticle.h
-- reb - Disabled by default
-- robotino - Could not find header robotinocom.h
-- segwayrmp - Disabled by default
-- service_adv_mdns - Disabled by default
-- sphinx2 - Disabled by default
-- sr3000 - Could not find header libusbSR.h
-- statgrab - Could not find package libstatgrab
-- stoc - Could not find header SVS/svsclass.h
-- swissranger - Could not find header libMesaSR.h
-- unicapimage - Could not find package libunicap
-- wlanscan - Could not find package libnl-1
-- xsensmt - Disabled by default - set XSENSMT_SOURCE_DIR
-- yarpimage - Could not find header yarp/os/all.h
-- ===================
--
-- ===== Examples =====
-- ====================
--
-- ===== Player utilities =====
-- XMMS plugin will not be built - XMMS not found
-- ============================
--
-- Configuring done
-- Generating done
-- Build files have been written to: /home/robot/playerstage/playersrc/build
       //输出结束,继续输入命令
make
sudo make install

测试下安装是否成功吧:

$pkg-config --modversion playercore
3.1.0-svn

这表示安装player3.1成功!

安装stage:

需要先安装opencv:

sudo apt-get install build-essential
sudo apt-get install libavformat-dev
sudo apt-get install ffmpeg
sudo apt-get install libcv2.1 libcvaux2.1 libhighgui2.1 python-opencv opencv-doc libcv-dev libcvaux-dev libhighgui-dev

stage现在托管在git中,假如你不懂git是什么,那按找步骤来吧

$sudo apt-get install git cmake g++ fltk1.1-dev libjpeg8-dev libpng12-dev libglu1-mesa-dev libltdl-dev
$ mkdir stage4
$ cd stage4
$ git clone git://github.com/rtv/Stage.git
$ export STG=$HOME/stg
$ cmake -DCMAKE_INSTALL_PREFIX=$STG Stage
$ make
$ make install
export STAGEPATH=/usr/local/lib

在安装过程可能会出现各种奇妙的错误,很大一部分是由于相关的软件没有安装,导致player/stage的交叉编译不能通过,需要你看他报错,看看自己什么没有安装。

现在测试下stage是否安装成功吧:

$stg/bin/stage stage4/Stage/worlds/simple.world

看看player的作用吧:

$palyer stage4/Stage/worlds/simple.cfg

出错了一定要去google查询,你会发现有很多和你志同道合的人,有前辈的经验的话,会少很多麻烦的






转载于:https://www.cnblogs.com/boyfood/archive/2012/04/06/2434699.html

 类似资料: