Coder Social home page Coder Social logo

rayvburn / humap_local_planner Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 1.0 1.33 MB

Human-aware robot trajectory planner using a hybrid trajectory candidates generation and spatiotemporal cost functions

License: BSD 3-Clause "New" or "Revised" License

CMake 1.80% Python 0.94% C++ 93.15% C 0.27% MATLAB 3.84%
local-planning navigation planning robot ros human-aware-navigation social-robots

humap_local_planner's Introduction

humap_local_planner

A local planning module for A Framework to Simulate Human Behaviour in Robot Research

Planner behaviour

Finite state machine of the planner is shown in the following diagram:

@startuml
state "Initiate Movement" as init
state "Move" as move
state "Adjust Orientation" as adjust
state "Stop" as stop

[*] --> init
init --> move : reached orientation \n of the first pose in a global plan \n (30 degrees tolerance)
move --> adjust : \treached goal position
adjust --> stop : \treached goal orientation
stop --> init : received new \n goal pose
@enduml

Prerequisites

apt packages

sudo apt install ros-$ROS_DISTRO-costmap-converter

teb_local_planner

Slightly modified teb_local_planner (its 'utils' in particular) is currently required for operation:

ROS Kinetic

git clone -b robot-footprint-model-access-fix [email protected]:rayvburn/teb_local_planner.git

ROS Melodic:

git clone -b melodic-devel-robot-footprint-model-access-fix [email protected]:rayvburn/teb_local_planner.git

fuzzylite

Additionally, fuzzylite library built from source is required to run humap_local_planner. Follow these steps:

cd ~/
mkdir libraries
cd libraries
git clone https://github.com/fuzzylite/fuzzylite.git

The run fuzzylite/build.sh script as pointed in library build instructions.

Disclaimer

This research code is provided with the intention of being helpful, but it comes with no guarantees; neither the implied warranty of merchantability nor fitness for any specific purpose is provided.

humap_local_planner's People

Contributors

rayvburn avatar

Watchers

Daniel Giełdowski avatar zhouzuhong avatar  avatar

Forkers

forrest-z

humap_local_planner's Issues

link `fuzzylite` library in a nice way

# fuzzylite library - external dependency
# path to the .so file
find_library(fuzzylite_LIBRARY fuzzylite $ENV{HOME}/libraries/fuzzylite/fuzzylite/release/bin)
# include fuzzylite's headers folder
include_directories($ENV{HOME}/libraries/fuzzylite/fuzzylite)

This is ugly and requires building from source. Use version installed via apt.

massive freezes during execution (simulation with `Gazebo`)

I've encountered massive freezes with Gazebo simulation in a pretty simple world.

EDIT: I've tested other planners (DWA, TEB) and situation is similar. It may be some issue with my PC? Nonetheless, TEB seems to execute approx 10 x faster than HuBeRo scoring ~100 trajectories in each step. It may be also caused by extensive logging of HuBeRo (and no logs passed to the console out from TEB).

Checked at the move_base level:

      ros::WallDuration t_diff = ros::WallTime::now() - start;
      ros::Duration t_diff_sim = ros::Time::now() - start_sim;
      ROS_INFO_NAMED("move_base","Full control cycle time: real {%.9f}, sim {%.9f}\n", t_diff.toSec(), t_diff_sim.toSec());

robot footprint class extension adjustments

calculateShortestVector and calculateClosestPoints methods in LineRobotFootprint are not implemented great (they need testing, also)

Additionally, testing is needed in:

  • TwoCirclesRobotFootprint
  • PolygonRobotFootprint

velocity saturation

  • saturate velocity to fit kinematic constraints
  • create a function that smoothly saturates velocity based on presence of dynamic objects nearby

error in distant pose cost calculation `HuberoPlannerROS::createCostGridPcl`

Added this section to HuberoPlannerROS::createCostGridPcl:

	geometry_msgs::PoseStamped pose_goal;
	planner_util_->getGoal(pose_goal);
	planner_util_->getCostmap()->worldToMapNoBounds(
		pose_goal.pose.position.x,
		pose_goal.pose.position.y,
		mx,
		my
	);
	planner_->computeCellCost(mx, my, path_cost, goal_cost, occ_cost, total_cost); 

Then, sometimes when mx or my is negative, HuberoPlanner::computeCellCost fails at:

	path_costs_.getCellCosts(cx, cy);

and move_base process dies. Interestingly, program does not even enter MapGridCostFunction::getCellCosts (added logs are not printed).

This happens for goals placed in a long distance from robot base. Behaviour observed only when move_base is restarted while mobile base controllers are still running. Therefore it's not investigated further at that moment.

article coverage

SMooTh: smooth social force model approach for lightweight reactive navigation for differential-drive mobile bases

avoiding local minima

  • in exemplary world it's easy to achieve by requesting the robot to go towards the wall upfront

Trapezoids calculation remake - eliminate specific cases, design a generic method

Currently there are specific cases, especially when intersection values are very big, when Trapezoid vertices are not calculated properly.

A good starting point:

bool TrapezoidParted::update(const double &start, const double &end) {
	// Creates parameter configuration equal to the uninitialized fl::Trapezoid instance
	std::string params("nan nan nan nan");
	std::string params_wrap("nan nan nan nan");

	Angle an(start - intersection_);
	Angle bn(an.getRadian() + intersection_, false);

	double top_length = 0.0;
	if (start >= end) {
		top_length = (IGN_PI - start) + (end - (-IGN_PI));
	} else {
		top_length = end - start;
	}
	Angle cn(bn.getRadian() + top_length, false);
	Angle dn(cn.getRadian() + intersection_, false);

	Angle shift(-IGN_PI);
	if (bn.getRadian() > IGN_PI) {
		shift = Angle(+IGN_PI);
	}
	Angle aw(an.getRadian() + shift.getRadian());
	Angle bw(bn.getRadian() + shift.getRadian());
	Angle cw(cn.getRadian() + shift.getRadian());
	Angle dw(dn.getRadian() + shift.getRadian());

	params = generateParams(an.getRadian(), bn.getRadian(), cn.getRadian(), dn.getRadian(), 1.0);
	params_wrap = generateParams(aw.getRadian(), bw.getRadian(), cw.getRadian(), dw.getRadian(), 1.0);
	trapezoid_ptrs_.at(0)->configure(params);
	trapezoid_ptrs_.at(1)->configure(params_wrap);

	return true;

Follow notes from 2021.11.12.
This change will most likely affect unit tests.

trajectory planning procedure

  • initial version can have a sampling-based approach implemented (like DWA)

  • additional cost to follow the global plan

  • human trajectory prediction with a use of SFM & fuzzy logic but beware of oscillations (it's still a potential field), so constant velocity model may also be considered (superposition?)

references:

use global plan for local navigation

  • global plan usage

  • place a local goal that stands for a goal for social force model calculations

  • visualize global and local goals

  • equip ontology with both global and local goals

  • modify grid visualization so it does not require a new plan for every new marker (?)

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.