Giter VIP home page Giter VIP logo

multirobot-obstacle-avoidance's Introduction

多机器人自动避障

1.配置环境与文件说明

将src下的各文件夹复制到本地对应的文件夹中,最好再次 catkin_make 编译一下。(其实只是在原来turtlebot的子文件夹中加入了几个launch、xml文件,为了不逐个复制,故将所有有文件加入的文件夹都放在了提供的src中。)

我们编写了几个插件来使障碍物运动,详见报告。在“插件”文件夹中启动终端,运行如下命令,复制插件到系统存放gazebo插件的文件夹中:

sudo cp libanimated_box.so /usr/lib/x86_64-linux-gnu/gazebo-9/plugins/libanimated_box.so
sudo cp libanimated_box1.so /usr/lib/x86_64-linux-gnu/gazebo-9/plugins/libanimated_box1.so
sudo cp libsquare_box.so /usr/lib/x86_64-linux-gnu/gazebo-9/plugins/libsquare_box.so
sudo cp libsquare_box2.so /usr/lib/x86_64-linux-gnu/gazebo-9/plugins/libsquare_box2.so
sudo cp libsquare_box3.so /usr/lib/x86_64-linux-gnu/gazebo-9/plugins/libsquare_box3.so
sudo cp libsquare_box4.so /usr/lib/x86_64-linux-gnu/gazebo-9/plugins/libsquare_box4.so

然后可以将home1.world和home2.world放入适当位置,这是我们创建的两种环境。最后是我们写好的动态避障算法代码,以apf_new.py文件为准。

2.启动gazebo

单机器人对应环境启动命令:

roslaunch turtlebot_gazebo turtlebot_world.launch world_file:=...

多机器人对应环境启动命令:

roslaunch turtlebot_gazebo turtlebot_world_.launch world_file:=...

在省略处加上home1.world或者home2.world的文件路径。

3.运行程序

在保存python代码文件的终端运行命令:

python apf_new.py

之后即可看到演示效果。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.