Skip to content

Commit 682c22a

Browse files
committed
better format
1 parent fe3bd3e commit 682c22a

File tree

10 files changed

+115
-217
lines changed

10 files changed

+115
-217
lines changed

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
# v1.2.1 Feb 3, 2025
9+
- compatible with easondrone
10+
11+
## v1.2.0: May 9, 2024
12+
- support XYZ_VEL control
13+
14+
## v1.1.1: May 2, 2024
15+
- build pass
16+
17+
## v1.1.0: May 1, 2024
18+
- [Update] Remove useless parameters
19+
- [Update] Face front for both drone and actor
20+
21+
## v1.0.2: May 1, 2024
22+
- cancel sim_mode
23+
24+
## v1.0.1: May 1, 2024
25+
- build pass

README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,12 @@ The apf_local_planner package, modified from [local_planner](https://github.com/
55
![HitCount](https://img.shields.io/endpoint?url=https%3A%2F%2Fhits.dwyl.com%2FHuaYuXiao%2FAPF-Planner.json%3Fcolor%3Dpink)
66
![Static Badge](https://img.shields.io/badge/ROS-noetic-22314E?logo=ros)
77
![Static Badge](https://img.shields.io/badge/C%2B%2B-17-00599C?logo=cplusplus)
8-
![Static Badge](https://img.shields.io/badge/MATLAB-2023b-?logo=)
98
![Static Badge](https://img.shields.io/badge/Ubuntu-20.04.6-E95420?logo=ubuntu)
109

1110
video on [bilibili](https://www.bilibili.com/video/BV1Lr421u7z9/)
1211

13-
## Release Note
14-
15-
- v1.2.0: support `XYZ_VEL` control
16-
- v1.1.0: drone facing front while moving
17-
1812
```bash
13+
cd ~/easondrone_ws
1914
catkin_make --source plan/apf_local_planner --build plan/apf_local_planner/build
2015
```
2116

config/apf_local_planner.rviz

Lines changed: 67 additions & 168 deletions
Large diffs are not rendered by default.

include/apf.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#include <algorithm>
88
#include <iostream>
99
#include <geometry_msgs/PoseStamped.h>
10-
#include <std_msgs/Empty.h>
1110
#include <sensor_msgs/PointCloud2.h>
1211
#include <nav_msgs/Odometry.h>
1312
#include <pcl/point_cloud.h>
@@ -17,8 +16,8 @@
1716

1817
using namespace std;
1918

20-
namespace Local_Planning{
21-
class APF:public local_planning_alg{
19+
namespace apf_local_planner{
20+
class APF: public local_planning_alg{
2221
private:
2322
// 参数
2423
double inflate_distance;
@@ -42,7 +41,6 @@ class APF:public local_planning_alg{
4241
nav_msgs::Odometry cur_odom_;
4342

4443
public:
45-
4644
virtual void set_odom(const nav_msgs::Odometry cur_odom);
4745
virtual void set_local_map(sensor_msgs::PointCloud2ConstPtr &local_map_ptr);
4846
virtual void set_local_map_pcl(pcl::PointCloud<pcl::PointXYZ>::Ptr &pcl_ptr);
@@ -52,7 +50,6 @@ class APF:public local_planning_alg{
5250
~APF(){}
5351

5452
typedef shared_ptr<APF> Ptr;
55-
5653
};
5754
}
5855

include/local_planning_alg.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,18 @@
33

44
#include <Eigen/Eigen>
55
#include <iostream>
6-
76
#include <ros/ros.h>
87
#include <visualization_msgs/Marker.h>
98
#include <geometry_msgs/PoseStamped.h>
10-
#include <std_msgs/Empty.h>
119
#include <sensor_msgs/PointCloud2.h>
1210
#include <nav_msgs/Odometry.h>
13-
1411
#include <pcl/point_cloud.h>
1512
#include <pcl/point_types.h>
1613
#include <pcl_conversions/pcl_conversions.h>
1714

1815
using namespace std;
1916

20-
namespace Local_Planning{
17+
namespace apf_local_planner{
2118

2219
class local_planning_alg{
2320
public:
@@ -31,7 +28,6 @@ class local_planning_alg{
3128

3229
typedef shared_ptr<local_planning_alg> Ptr;
3330
};
34-
3531
}
3632

3733
#endif

launch/apf_local_planner.launch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
<launch>
33
<!-- 启动全局规划算法 -->
44
<node pkg="apf_local_planner" type="apf_local_planner" name="apf_local_planner" output="screen" launch-prefix="gnome-terminal --">
5-
<param name="local_planner/local_pcl_topic_name" value="/prometheus/merged_pcl"/>
5+
<param name="cloud_topic" value="/livox/lidar"/>
66
<!-- 最大速度 -->
7-
<param name="local_planner/max_planning_vel" value="0.6"/>
7+
<param name="manager/max_vel" value="0.7"/>
88

99
<!-- APF参数 -->
1010
<!-- 膨胀参数,一般设置为无人机的半径或更大 -->
11-
<param name="apf/inflate_distance" value="0.35" type="double"/>
11+
<param name="grid_map/obstacles_inflation" value="0.35" type="double"/>
1212
<!-- 感知距离,只考虑感知距离内的障碍物 -->
13-
<param name="apf/obs_distance" value="5.0" type="double"/>
13+
<param name="grid_map/local_update_range" value="5.0" type="double"/>
1414
<!-- 增益 -->
1515
<param name="apf/k_repulsion" value="0.6" type="double"/>
1616
<param name="apf/k_attraction" value="0.4" type="double"/>
@@ -19,7 +19,7 @@
1919
<!-- 最大吸引距离 -->
2020
<param name="apf/max_att_dist" value="4" type="double"/>
2121
<!-- 地面高度,不考虑低于地面高度的障碍物 -->
22-
<param name="apf/ground_height" value="0.1" type="double"/>
22+
<param name="grid_map/ground_height" value="0.1" type="double"/>
2323
<!-- 地面安全高度,小于该高度,会产生向上推力 -->
2424
<param name="apf/ground_safe_height" value="0.3" type="double"/>
2525
<!-- 停止距离,小于该距离,停止自动飞行 -->

launch/mapping.launch

Lines changed: 0 additions & 17 deletions
This file was deleted.

launch/simulation.launch

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
<launch>
2-
<!-- world -->
3-
<include file="$(find prometheus_gazebo)/launch/GFKD.launch"/>
2+
<include file="$(find easondrone_gazebo)/launch/mavros_posix_sitl.launch">
3+
<arg name="world" default="$(find easondrone_gazebo)/worlds/competition/cuadc2024.world"/>
4+
<arg name="sdf" default="$(find easondrone_gazebo)/models/drone/iris_d435i_mid360/iris_d435i_mid360.sdf"/>
5+
<arg name="gui" default="false"/>
6+
</include>
47

5-
<!-- 1号无人机 -->
6-
<include file="$(find prometheus_gazebo)/launch/sitl_$(arg model).launch"/>
8+
<node name="filter_pc" type="filter_pc" pkg="easondrone_mapping"/>
79

8-
<include file="$(find uav_control)/launch/uav_control_main_indoor.launch"/>
10+
<include file="$(find easondrone_gazebo)/launch/transform.launch"/>
911

10-
<!-- 启动octomap建图 -->
11-
<include file="$(find apf_planner)/launch/mapping.launch"/>
12+
<include file="$(find px4ctrl)/launch/px4ctrl.launch"/>
13+
14+
<node type="odom_visualization" pkg="odom_visualization" name="odom_visualization"/>
1215

1316
<!-- 启动导航 -->
1417
<include file="$(find apf_local_planner)/launch/apf_local_planner.launch"/>

src/apf.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
#include "apf.h"
22

3-
namespace Local_Planning{
3+
namespace apf_local_planner{
44
void APF::init(ros::NodeHandle& nh){
55
has_local_map_ = false;
66

7-
nh.param("apf/inflate_distance", inflate_distance, 0.35); // 感知障碍物距离
7+
nh.param("grid_map/obstacles_inflation", inflate_distance, 0.35); // 感知障碍物距离
88
nh.param("apf/sensor_max_range", sensor_max_range, 5.0); // 感知障碍物距离
99
nh.param("apf/k_push", k_push, 0.8); // 推力增益
1010
nh.param("apf/k_att", k_att, 0.4); // 引力增益
1111
nh.param("apf/min_dist", min_dist, 0.2); // 最小壁障距离
1212
nh.param("apf/max_att_dist", max_att_dist, 5.0); // 最大吸引距离
13-
nh.param("apf/ground_height", ground_height, 0.1); // 地面高度
13+
nh.param("grid_map/ground_height", ground_height, 0.1); // 地面高度
1414
nh.param("apf/ground_safe_height", ground_safe_height, 0.3); // 地面安全距离
1515
nh.param("apf/safe_distance", safe_distance, 0.1); // 安全停止距离
1616
}

src/planner_node.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include <ros/ros.h>
22
#include "local_planning.h"
33

4-
using namespace Local_Planning;
4+
using namespace apf_local_planner;
55

66
int main(int argc, char** argv){
77
ros::init(argc, argv, "apf_local_planner");

0 commit comments

Comments
 (0)