collision-avoidance-library Quickstart

원시문


Quickstart


Murilo Belluzzo edited this page on Mar 16 · 13 revisions

Quickstart Guide


This is a quick guide to get the source, compile all the features and run a simulation. Our simulation environment were validated with the following revisions/releases:
Software
Version
Gazebo
8.0.0
PX4
1.6.0-rc1
ArduCopter
3.4
librealsense
v.1.12.1
Install Pre-Requisites
Install Gazebo
Install socatsudo apt-get install socatThe project uses Gazebo as simulation environment, so it needs to be installed if that feature is desired. Check your distro for available packages for gazebo. If none is available, the last stable version can be obtained at gazebosim.org.
Besides Gazebo itself, our test infrastructure depends on two additional plugins in order to execute the simulation and automated testing: Gazebo Sitl and Gazebo Realsense, so thoses will have to be properly installed as well. Please, follow the instructions of each project on how to do it.

Install Autopilot


The project supports Ardupilot and PX4 as autopilots. For this quick guide we will be using Ardupilot. The project is available at the project's github page. Check Ardupilot's project wiki for instructions on how to build and install.

Build and Install


Detailed instructions on how to build and install the project can be found in our README. To be able to run simulations and automated tests, its necessary to enable Tools and Gazebo support during compiling, so make sure that -DWITH_TOOLS=ON -DWITH_GAZEBO=ON is passed to cmake.

Running Simulations


The project provides a script to automate the process of running the autopilot, gazebo and running coav-control plus linking it all together. The script is called coav-sim.sh and can be found in the testbed directory.
Arguments passed to coav-sim.sh will be provided to coav-control and the following table describes some environment variables that can be use to customize the execution.
Environment Variable
Description
AUTOPILOT
Defines which autopilot to use. Valid values are AP_APM and AP_PX4. Default is AP_PX4.
APM_DIR
Prefix path to use to call 'arducopter' when AP_APM is used. Default is empty.
PX4_DIR
Prefix path to use to run PX4 simulation. Default is $HOME/px4/Firmware.
WORLD
File name of the Gazebo environment (sdf file) that will be used in the simulation. Default is 'simple_obstacle.sdf'.
LOGDIR
Path to where to save log files. Default is script path/logs.
The following command will start a simulation using Gazebo RealSense as sensor, Simple Detector as detector, Stop Avoidance as avoidance strategy and Ardupilot as autopilot:
avoidance_algorithm
QC_SHIFT_AVOIDANCE
QC_STOP
QC_VFF
QC_STOP_AVOIDANCE는 avoidance입니다.algorithm에 없어서 오류가 발생했습니다.
AUTOPILOT=AP_APM APM_DIR=~/git/AC3.4/ardupilot/build/sitl/bin
./coav-sim.sh -a QC_STOP_AVOIDANCE -d DI_POLAR_HIST -s ST_GAZEBO_REALSENSEAUTOPILOT=AP_APM APM_DIR=~/git/AC3.4/ardupilot/build/sitl/bin LOGDIR=~/ VERBOSE_LEVEL=1
./coav-sim.sh -a QC_STOP -d DI_POLAR_HIST -s ST_GAZEBO_REALSENSE
arductor 출력 아래 로그
invalid param FRAME_TYPE in defaults file
AP_Param: Invalid param in defaults file
~/git/collision-avoidance-library/testbed/copter.파르메의
FRAME_TYPE 및 FRAMECLASS가 원인입니다.
FRAME_TYPE를 FRAME, FRAME로 수정CLASS 제거
coav-control와 ArduCopter는 TCP PORT5762를 통해 충돌을 회피하는 simutation을 통신합니다
Connection refused 당했습니다.
FRAME_TYPE를 FRAME, FRAME로 수정CLASS 삭제를 통해서 이것도 해결이 됐어요.
원인은 ArduCopter의 SITL이 매개변수 오류로 인해 제대로 부팅되지 않았기 때문인 것 같습니다.
2017/12/27 15:49:03 socat[3177] E connect(5, AF=2 127.0.0.1:5762, 16): Connection refused
이번에 gzserver(gazeboserver)에서 오류가 발생했습니다.
만약 gzserver가realsense의 초기화를 시작한 후 바로 gzclient를 시작하면 이 오류를 출력하지 않습니다.
gzserver:/build/ogre-1.9-mqY1wq/ogre-1.9-1.9.0+dfsg1/OgreMain/include/OgreAxisAlignedBox.h:252: void >Ogre::AxisAlignedBox::setExtents(const Ogre::Vector3&, const Ogre::Vector3&): Assertion `(min.x <= max.x >&& min.y <= max.y && min.z <= max.z) && "The minimum corner of the box must be less than or equal to >maximum corner"' failed.
The simulation will start only gazebo server. To see the simulation in Gazebo's graphical interface, open a separate terminal an run the command:gzclient이런 느낌으로 가즈보에realsense의quad를 불러왔지만 아래에 메시지가 출력되었습니다.
librealsense v2를 설치하면 출력되지 않을 것 같습니다.
**collision-avoidance library는librealsensev1이어야 합니다.
이 경고 무시해도 돼요.
[Wrn] [msgs.cc:1832] Conversion of sensor type[depth] not supported.
[Wrn] [msgs.cc:1832] Conversion of sensor type[depth] not supported.

비디오(youtube)


좋은 웹페이지 즐겨찾기