GithubHelp home page GithubHelp logo

ai-winter / ros_motion_planning Goto Github PK

View Code? Open in Web Editor NEW
2.0K 2.0K 295.0 143.58 MB

Motion planning and Navigation of AGV/AMR:ROS planner plugin implementation of A*, JPS, D*, LPA*, D* Lite, Theta*, RRT, RRT*, RRT-Connect, Informed RRT*, ACO, PSO, Voronoi, PID, LQR, MPC, DWA, APF, Pure Pursuit etc.

License: GNU General Public License v3.0

CMake 2.20% C++ 92.41% Shell 0.06% Python 5.25% Dockerfile 0.09%
ant-colony-optimization artificial-potential-field astar dstar dstar-lite informed-rrt-star jump-point-search lpa-star model-predictive-control motion-planning path-planning pure-pursuit robotics ros ros-navigation rrt rrt-connect rrt-star theta-star voronoi

ros_motion_planning's Introduction

Hello, I'm Winter. Welcome to my page!

csdn wechat github bilibili zhihu


About me

  • 📝 Graduated from Control Science and Engineering, Tongji University
  • 😄 I am interested in Robotic Motion Planning and NavigationDeep Reinforcement LearningMachine Learning...
Winter's github stats

Top Repositories

ros_motion_planning's People

Contributors

ai-winter avatar avcuenes avatar jzx-my avatar omigeft avatar realharvey avatar zhanyuguo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ros_motion_planning's Issues

Real Robot

Is it applicable for real robot and how? Can I test them especially RRTs in real robot, also user_config.yaml have world parameter , this is for gazebo.

Unable to start voronoi map

If the map layers are loaded in plugin form(user_config.yaml), it has been observed that certain planning algorithms, such as D*, do not work properly, resulting in the inability to activate the Voronoi layer under normal circumstances.

Three-robots PathPlanning Failed

Hello. I made the modifications according to what you said and found that although three robots can indeed be displayed, clicking on [2D Nav Goal] does not move the robots. Is there a problem with which namespace? I haven't found it yet.
000

costmap

Hello. I have been puzzled for several days. When using RRT, why can I see the costmap in Rviz simulation, but the path planning does not follow the costmap, instead, it follows the static map layer? Thank you.

"The JPS algorithm may have flaws."

"The JPS algorithm that I have learned will continuously search along a certain direction during pathfinding, until it encounters an obstacle or reaches a jump node. However, I found that the jump() function is not like that. It may have various unexpected search mutations during recursion, due to the const Node& motion parameter. In some cases, the search path may exhibit strange curved paths."

Node JumpPointSearch::jump(const Node& point, const Node& motion )
{
  Node new_point = point + motion;
  new_point.id_ = grid2Index(new_point.x_, new_point.y_);
  new_point.pid_ = point.id_;
  new_point.h_ = std::sqrt(std::pow(new_point.x_ - goal_.x_, 2) + std::pow(new_point.y_ - goal_.y_, 2));

  // next node hit the boundary or obstacle
  if (new_point.id_ < 0 || new_point.id_ >= ns_ || costs_[new_point.id_] >= lethal_cost_ * factor_)
    return Node(-1, -1, -1, -1, -1, -1);

  // goal found
  if (new_point == goal_)
    return new_point;

  // diagonal
  if (motion.x_ && motion.y_)
  {
    // if exists jump point at horizontal or vertical
    Node x_dir = Node(motion.x_, 0, 1, 0, 0, 0);
    Node y_dir = Node(0, motion.y_, 1, 0, 0, 0);
    if (jump(new_point, x_dir).id_ != -1 || jump(new_point, y_dir).id_ != -1)
      return new_point;
  }

  // exists forced neighbor
  if (detectForceNeighbor(new_point, motion))
    return new_point;
  else
    return jump(new_point, motion);  // 
}

``

Not find packages

When make catkin_make in file, it works without any error, but some packages and files such as nav_core, global_planner or utils directory can not see connection between them. Also, any changes in user config does not effect about changing of global and local planner. I solved this problem with using roscd and rospack for me and I wanted to let you know

catkin_make error

...
[ 98%] Linking CXX shared library /home/lhj/motionplanning_ws/devel/lib/libPedestrianSFMPlugin.so
/usr/bin/ld: /usr/local/lib/libprotobuf.a(arena.o): relocation R_X86_64_TPOFF32 against symbol _ZN6google8protobuf8internal9ArenaImpl13thread_cache_E' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/lib/libprotobuf.a(common.o): relocation R_X86_64_PC32 against symbol stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[2]: *** [ros_motion_planning/src/third_party/gazebo_plugins/pedestrian_sfm_plugin/CMakeFiles/PedestrianSFMPlugin.dir/build.make:167: /home/lhj/motionplanning_ws/devel/lib/libPedestrianSFMPlugin.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:5398: ros_motion_planning/src/third_party/gazebo_plugins/pedestrian_sfm_plugin/CMakeFiles/PedestrianSFMPlugin.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

Thank you for your program! The above is my compilation error.
There was no such error a few weeks ago. But today when I moved this project to a new workspace, he compiled with this error. This error occurs in both new and old workspaces, and I haven't fixed the code.

Localization lost

Hi @ZhanyuGuo ,Thanks for your contribution. There is a problem that real localization and published location are doesn't matched after i run ./main.sh.how can I correct the wrong location?

Sampling-based algorithms for dynamic obstacles? :)

Thank you for sharing this great work as open source!

I was wondering whether you are planning on expanding the set of sampling-based algorithms to handle dynamic obstacles,i.e, algorithms like RT-RRT*, Am-RRT*, or Bi-AM-RRT*.

Regards,

catkin_make error, miss file

ros_motion_planning/src/planner/global_planner/evolutionary_planner/include/ga.h:22:10: fatal error: trajectoryGeneration.h: No such file or directory
   22 | #include "trajectoryGeneration.h"

can't find this file, have you ever meet one?

Map not recieved

I get the error below on the terminal

[ WARN] [1683284527.630343657, 90.141000000]: No laser scan received (and thus no pose updates have been published) for 90.141000 seconds. Verify that data is being published on the /scan topic.
[ WARN] [1683284531.473494152, 91.721000000]: Timed out waiting for transform from base_footprint to map to become available before running costmap, tf error: canTransform: target_frame map does not exist.. canTransform returned after 0.1 timeout was 0.1.
[ WARN] [1683284544.047433434, 96.821000000]: Timed out waiting for transform from base_footprint to map to become available before running costmap, tf error: canTransform: target_frame map does not exist.. canTransform returned after 0.1 timeout was 0.1.

I did not find anywhere you broadcast transform

robot not moving through service call

Hi, I am using RRT* as my global planner and apf as my local planner. When I use 2dNavGoal in rviz, the robot is moving but when i do a service call using
rosservice call /move_base/SamplePlanner/make_plan "start: {header: {stamp: now, frame_id: 'map'}, pose: {position: {x: 0.0, y: 0.0, z: 0.0}, orientation: {x: 0.0, y: 0.0, z: 0.0, w: 1.0}}}
goal: {header: {stamp: now, frame_id: 'map'}, pose: {position: {x: -6.4, y: 0.3, z: 0.0}, orientation: {x: 0.0, y: 0.0, z: 0.0, w: 1.0}}}"

I am getting the plan and tree in rviz but the robot is not moving.
I am not sure whether the goal is passed to move_base. Also I can't find the section of the code where the goal is passed to move_base. Some help is very much appreciated. Thanks in advance.

Another map

Hello,

I would like to execute these algorithms my own world. Can you tell me what I have to do?
I created world and map according to gmapping and rviz file. I use turtlebot3 waffle. Thank you for your supports.

Problems testing multiple turtlebots

Hello there. I tried testing multiple turtlebots by modifying the user_config.yaml but the simulation stayed the same and only displayed one turtlebot. Im using the same example as the one you gave. Is there something im missing?

Thanks.

example

Non ROS-Version

Hi,
is it planned or possible to release a non-ROS, pure C++ version of this package?

Questions about the controller

First of all, I would like to express my appreciation for this project, it's really helpful for me to understand how to write a planner by myself!

Robot navigation can be divided into several steps: mapping, localization, global plan, local plan and control. I want to know if I can control a mobile robot well in the real world using only a DWA planner or PID planner(it is not a controller, right? haven't read it.), or if I need to write a controller.

In addition, whether I need to write a controller or not, I would like to know how to write a controller myself. Is there a resource for this topic(control), preferably one as clear as yours(planning)? I am looking forward to your reply!

ubuntu 18.04

ubuntu 18.04

When I compile by catkin_make, it prompts an error.
`Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- Could NOT find utils (missing: utils_DIR)
-- Could not find the required component 'utils'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found.
CMake Error at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by "utils" with any of
the following names:

utilsConfig.cmake
utils-config.cmake

Add the installation prefix of "utils" to CMAKE_PREFIX_PATH or set
"utils_DIR" to a directory containing one of the above files. If "utils"
provides a separate development package or SDK, be sure it has been
installed.
Call Stack (most recent call first):
planner/global_planner/graph_planner/CMakeLists.txt:4 (find_package)
`
2023-05-31 21-24-22屏幕截图

Failed to get a path.

This is a great project you have here. I tried playing it myself, but I found that the path planning often fails when the endpoint is near obstacles. What could be the reason for this? Best wishes!

Display Path

hi,how to display the path and length of the path that the robot has walked using the RRT algorithm?Thank you in advance for your reply
image

apf Local path planning

When I use APF as a local path planning method, when the robot reaches the endpoint, it will deviate from the target point and will not stop at the target point.
88eb08e9a89dcb006862e40c4ced411
05fe7b9927b1a736c1503d05d6dab73

catkin_make did not pass

strian_sfm_plugin/src/pedestrian_sfm_plugin.cpp:133:25: error: ‘ignition::math::v4::Pose3d {aka class ignition::math::v4::Pose3}’ has no member named ‘X’
goal.center.set(g.X(), g.Y());

errors are above. i have search via google but found nothing

SyntaxError: invalid syntax

hello, I encoutered this problem, but it does not seem to affect the navigation. I am not sure if there is an unknown impact. Can you help check it out? thank you.

File "../src/third_party/dynamic_xml_config/main_generate.py", line 20
def init(self, *plugins) -> None:
^
SyntaxError: invalid syntax

Build Error

make[2]: *** No rule to make target '/usr/lib/x86_64-linux-gnu/libignition-math6.so.6.15.0', needed by '/home/gzy/Workspace/ros_motion_planning/devel/.private/gazebo_ped_visualizer_plugin/lib/libPedestrianVisualPlugin.so'. Stop.

voronoi fail

Hi there. I tried to test the voronoi method by modifying user_config.yaml, but I get an error as shown below. Did I set the wrong parameters?

Thank you.
image
image

l stop here and can not open gazeboll .it is dark

[INFO] [1680004959.181575, 0.000000]: Loading model XML from ros parameter robot_description
[INFO] [1680004959.185961, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
[ INFO] [1680004959.307924071]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1680004959.309054772]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[ INFO] [1680004959.353289594]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1680004959.354068298]: waitForService: Service [/gazebo_gui/set_physics_properties] has not been advertised, waiting...
[ INFO] [1680004960.756150750]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1680004960.768146522]: Physics dynamic reconfigure ready.
[INFO] [1680004960.995906, 0.000000]: Calling service /gazebo/spawn_urdf_model

image

How to set the resolution?

Hello, I'm here to help. In the process of using it, how can I modify the resolution? How can I match the algorithm according to the actual size of the machine?
Looking forward to your response. Thank you!

Failed to run MPC local planner

I've installed all the dependencies, but this error occurs:

[FATAL] [1712800952.056223995, 1711543538.130066234]: Failed to create the mpc_planner/MPCPlanner planner, are you sure it is properly registered and that the containing library is built? Exception: Failed to load library /home/lhj/catkin_ws/devel/lib//libmpc_planner.so. Make sure that you are calling the PLUGINLIB_EXPORT_CLASS macro in the library code, and that names are consistent between this macro and your XML. Error string: Could not load library (Poco exception = libOsqpEigen.so.0.8.1: cannot open shared object file: No such file or directory)

The libmpc_planner.so and libOsqpEigen.so.0.8.1 does exist. Why compiler show that libmpc_planner.so exist in ***/catkin_ws/devel/lib//libmpc_planner.so and not in ***/catkin_ws/devel/lib/libmpc_planner.so. In the latter, there are no two "/" that are the right path.

source directory in third party directory missing ped_state.h

Errors << gazebo_ped_visualizer_plugin:make /home/rob-kkj/home/ros_motion_planning/logs/gazebo_ped_visualizer_plugin/build.make.000.log
In file included from /home/rob-kkj/home/ros_motion_planning/src/ros_motion_planning/src/third_party/gazebo_plugins/pedestrian_visualizer_plugin/gazebo_ped_visualizer_plugin/src/pedestrian_visual_plugin.cpp:18:
/home/rob-kkj/home/ros_motion_planning/src/ros_motion_planning/src/third_party/gazebo_plugins/pedestrian_visualizer_plugin/gazebo_ped_visualizer_plugin/include/pedestrian_visual_plugin.h:38:10: fatal error: gazebo_sfm_plugin/ped_state.h: No such file or directory
38 | #include <gazebo_sfm_plugin/ped_state.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/PedestrianVisualPlugin.dir/build.make:76: CMakeFiles/PedestrianVisualPlugin.dir/src/pedestrian_visual_plugin.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2451: CMakeFiles/PedestrianVisualPlugin.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
cd /home/rob-kkj/home/ros_motion_plann

How to modify the update time of the global path

When I use the RRT algorithm, the update time of the global path is too short, so sometimes it will cause the robot to circle in place. Where should I modify the update time of the global path? I would be very grateful if you could reply

Run Error (D*,D*_lite )

Operating environment

Ubuntu 18.06
ROS (Melodic)

Problem description

In the real machine test, when planner is used as the plug-in of move_base, the compilation is successful, and other global path planning algorithms run without exception. However, when d_star and d_star_lite are used as global path algorithms, the following two error messages (basically the first kind) appear when the path planning algorithm is started at the map boundary:

The first error message
[move_base-17] process has died [pid 5793, exit code -11

The second error message
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
[move_base-17] process has died [pid 8520, exit code -6,

Can you look at the reason for the error? Thank you very much.

change the algorithm

Hello, I am a beginner and I would like to ask how to change the algorithm for small cars from A * to rrt algorithm,Thank you in advance for your answer

Add pedestrians

Hello, I'm here to help.
My configuration file is set like this:
image
image
But no pedestrians or other dynamic obstacles appear in gazebo and rviz. How do I add them?

can't find file

:~/ros_study/src/ros_motion_planning/src/sim_env/scripts$ ./main.sh
RLException: [main.launch] is neither a launch file in package [sim_env] nor is [sim_env] a launch file name
The traceback for the exception was written to the log file
how can I solve this problem?

RRT not visible on screen

Hi, I was trying to run the code with the RRT algorithm. I edited the file "user_config.yaml" by entering:
robot1_global_planner: "rrt"
robot1_local_planner: "pid"

The only thing that is modified besides this was the gui of gazebo.
Once I run the command on Rviz, using a 2dnav goal, I get nothing. The turtlebot starts moving but I don’t see the RRT tree on the screen. With other global planners instead I see on screen what I should get without problems.
Thanks in advance for the support

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.