1 Star 0 Fork 0

YanyZhao/robot-arm-rrt-obstacle-avoidance

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

6-DoF Robot Arm Obstacle avoidance

The objective is to find collision free path from start to goal position even in the presence of multiple obstacles. RRT based (rapidly-exploring random tree) method is used to explore the collision free movement space.

ROS controller template and Elfin robot assets were adapted from https://github.com/modulabs/arm-control.

Implemented for this project:

  • Pathfinding using rapidly-exploring random tree (RRT)
  • Collision detection between the robot and the obstacles
  • Motion controller
  • Visualizations (collision volume, obstacles, point cloud)

demogif

Fig 1: Robot finding its way past the solid green obstacles.

Fig 1 demonstrates how the space is explored using two trees, one starting at start position and the other at goal. Connections between the trees' points are not visualized because in 3D these connections would be non-linear.

The green see-through field is the robot's approximate collision volume. This is the volume that is considered when computing collisions with the obstacles.

Solid green spheres are the obstacles that must be avoided when moving towards goal position. When collision free path is found it is forwarded to the motion controller and the robot begins moving.

Pathfinding using rapidly-exploring random tree (RRT)

RRT 2D example

Fig 2: Tree expansion in 2D. Animation from Wikipedia.

This project uses two trees: one begins at start position and the other at goal position. Both trees are expanded for set amount of iterations. Also known as bidirectional RRT.

Expansion is implemented by randomly generating candidate robot poses. The algorithm searches for its closest tree branch and tries to connect to it. The connection is tested for collission. If the whole connection is collision free then the candidate pose is added to the tree.

After the expansion phase an attempt to merge these two trees is made. If any collision free path is found between these trees the trees are merged to form a single tree and path from start to goal can be generated. Following this path guarantees collision free movement.

Installation & building

Install gazebo-ros-pkgs and gazebo-ros-control $ sudo apt-get install ros-kinetic-gazebo-ros-pkgs ros-kinetic-gazebo-ros-control

Install effort-controllers to use torque-control interface $ sudo apt-get install ros-kinetic-effort-controllers

Build project $ catkin_make -DCMAKE_BUILD_TYPE=Debug

To build and run tests $ catkin_make run_tests -DCMAKE_BUILD_TYPE=Debug

Example run

$ source devel/setup.bash
$ roslaunch elfin_launch manipulator_controller.launch

# In another terminal
$ source devel/setup.bash
$ roslaunch rrt_solver rrt.launch

# Set joint space target (joint degrees)
rostopic pub -1 /elfin/manipulator_controller/command_jog std_msgs/Float64MultiArray "{layout: {dim: [], data_offset: 0}, data: [0,   0,   120, 0, -30, 0]}"

# Target to get back to initial position
rostopic pub -1 /elfin/manipulator_controller/command_jog std_msgs/Float64MultiArray "{layout: {dim: [], data_offset: 0}, data: [0,   0,   0,    0,   0,  0]}"
MIT License Copyright (c) 2019 tomsep Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

RRT based path planning in the presence of obstacles. 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yanyzhao/robot-arm-rrt-obstacle-avoidance.git
git@gitee.com:yanyzhao/robot-arm-rrt-obstacle-avoidance.git
yanyzhao
robot-arm-rrt-obstacle-avoidance
robot-arm-rrt-obstacle-avoidance
master

搜索帮助