Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

KD-tree attempt #494

Draft
wants to merge 28 commits into
base: dynamically-feasible-trajectories
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
90b2e5b
Fix histogram compression (#475)
baumanta Sep 2, 2019
1e18652
don't send range invalid range message
baumanta Sep 3, 2019
9fcb0ac
Port FSM to Local Planner (#472)
mrivi Sep 3, 2019
000650c
Plan dynamically feasible trajectories
Jul 22, 2019
65bcc6c
Fix style and tests
Jul 29, 2019
c04e945
Plan setpoints and positions separately
Jul 30, 2019
07589db
Stop A* at goal and fix setpoint visualization
Jul 30, 2019
32af0e4
Get rid of dynamic allocation when doing simulation and you only need…
jkflying Sep 3, 2019
ac9903f
Slightly cleaner trajectory simulator reusage
jkflying Sep 4, 2019
2327540
- add escape directions to the best candidate directio
mrivi Sep 15, 2019
18d0dd2
tmp
mrivi Sep 26, 2019
ae115b8
minor cleanup
mrivi Sep 27, 2019
84319ee
clang format
mrivi Sep 27, 2019
6a76096
Hack the histogram to get nearest distance in any direction from a po…
Jul 16, 2019
7a99f0a
KDTree: add getAllPoints() and size()
Sep 27, 2019
d14300b
KDTree: replace PCL cloud in planner
Sep 27, 2019
717f4dd
Fix style
Sep 27, 2019
e8a020a
star_planner: remove histogram
Sep 30, 2019
5c71530
star_planner: plan to goal
Sep 30, 2019
a486386
Fix style
Sep 30, 2019
6dc0c50
star_planner: use orientation to body-align setpoints
Sep 30, 2019
38a4521
star_planner: fix distance cost function
Sep 30, 2019
8766701
star_planner: exit search if outside sensor horizon
Sep 30, 2019
740fe1b
star_planner: move heuristic back to distance-based from time
Oct 1, 2019
7cb69c9
star_planner: only add nodes far enough from current nodes
Oct 1, 2019
ca41c59
star_planner: rename origin to current_node
Oct 1, 2019
10965dc
tree_node: rename origin to parent
Oct 1, 2019
f87509f
Use endpoints instead of whole trajectory
jkflying Oct 24, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion avoidance/include/avoidance/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ struct ModelParameters {
float param_acc_up_max = NAN; // Maximum vertical acceleration in velocity controlled modes upward
float param_mpc_z_vel_max_up = NAN; // Maximum vertical ascent velocity
float param_mpc_acc_down_max = NAN; // Maximum vertical acceleration in velocity controlled modes down
float param_mpc_vel_max_dn = NAN; // Maximum vertical descent velocity
float param_mpc_z_vel_max_dn = NAN; // Maximum vertical descent velocity
float param_mpc_acc_hor = NAN; // Maximum horizontal acceleration for auto mode and
// maximum deceleration for manual mode
float param_mpc_xy_cruise = NAN; // Desired horizontal velocity in mission
Expand Down Expand Up @@ -353,6 +353,28 @@ pcl::PointCloud<pcl::PointXYZ> removeNaNAndGetMaxima(pcl::PointCloud<pcl::PointX
**/
void updateFOVFromMaxima(FOV& fov, const pcl::PointCloud<pcl::PointXYZ>& maxima);

/**
* @brief compute the maximum speed allowed based on sensor range and vehicle tuning
* @param jerk, vehicle maximum jerk
* @param accel, vehicle maximum horizontal acceleration
* @param braking_distance, maximum sensor range
* @returns maximum speed
**/
float computeMaxSpeedFromBrakingDistance(const float jerk, const float accel, const float braking_distance);

/**
* @brief compute if the cruise speed requested by paramters or mission item is feasible based on vehicle dynamics
*and sesnor range
* @param jerk, vehicle maximum jerk
* @param accel, vehicle maximum horizontal acceleration
* @param braking_distance, maximum sensor range
* @param mpc_xy_cruise, desired speed set from parameter
* @param mission_item_speed, desired speed set from mission item
* @returns maximum speed
**/
float getMaxSpeed(const float jerk, const float accel, const float braking_distance, const float mpc_xy_cruise,
const float mission_item_speed);

inline Eigen::Vector3f toEigen(const geometry_msgs::Point& p) {
Eigen::Vector3f ev3(p.x, p.y, p.z);
return ev3;
Expand All @@ -373,6 +395,11 @@ inline Eigen::Vector3f toEigen(const pcl::PointXYZI& p) {
return ev3;
}

inline std::array<float, 3> toArray(const Eigen::Vector3f& ev3) {
std::array<float, 3> ret{ev3.x(), ev3.y(), ev3.z()};
return ret;
}

inline Eigen::Quaternionf toEigen(const geometry_msgs::Quaternion& gmq) {
Eigen::Quaternionf eqf;
eqf.x() = gmq.x;
Expand Down
Loading