ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Genetic Algorithm as global planner plugin

asked 2019-03-24 07:23:22 -0500

huyrua291996 gravatar image

I am working on project "path planning for differential drive". Now I try to write genetic algorithm planner plugin based on "iPath" code. My code in this repository : https://github.com/huyrua291996/ga_pl... But it do not work, it can not create the plugin. The results here:


... logging to /home/huy/.ros/log/effd1a2c-4d34-11e9-a995-acd1b8d84627/roslaunch-huy-Inspiron-3543-10660.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://localhost:46375/

SUMMARY
========

PARAMETERS
 * /amcl/base_frame_id: base_footprint
 * /amcl/gui_publish_rate: 10.0
 * /amcl/initial_pose_a: 0.0
 * /amcl/initial_pose_x: 0.0
 * /amcl/initial_pose_y: 0.0
 * /amcl/kld_err: 0.05
 * /amcl/kld_z: 0.99
 * /amcl/laser_lambda_short: 0.1
 * /amcl/laser_likelihood_max_dist: 2.0
 * /amcl/laser_max_beams: 60
 * /amcl/laser_max_range: 12.0
 * /amcl/laser_model_type: likelihood_field
 * /amcl/laser_sigma_hit: 0.2
 * /amcl/laser_z_hit: 0.5
 * /amcl/laser_z_max: 0.05
 * /amcl/laser_z_rand: 0.5
 * /amcl/laser_z_short: 0.05
 * /amcl/max_particles: 2000
 * /amcl/min_particles: 500
 * /amcl/odom_alpha1: 0.2
 * /amcl/odom_alpha2: 0.2
 * /amcl/odom_alpha3: 0.2
 * /amcl/odom_alpha4: 0.2
 * /amcl/odom_alpha5: 0.1
 * /amcl/odom_frame_id: odom
 * /amcl/odom_model_type: diff
 * /amcl/recovery_alpha_fast: 0.0
 * /amcl/recovery_alpha_slow: 0.0
 * /amcl/resample_interval: 1
 * /amcl/transform_tolerance: 1.0
 * /amcl/update_min_a: 0.2
 * /amcl/update_min_d: 0.25
 * /amcl/use_map_topic: False
 * /move_base/DWAPlannerROS/acc_lim_theta: 2.0
 * /move_base/DWAPlannerROS/acc_lim_x: 1.0
 * /move_base/DWAPlannerROS/acc_lim_y: 0.0
 * /move_base/DWAPlannerROS/forward_point_distance: 0.325
 * /move_base/DWAPlannerROS/global_frame_id: odom
 * /move_base/DWAPlannerROS/goal_distance_bias: 24.0
 * /move_base/DWAPlannerROS/max_rot_vel: 0.5
 * /move_base/DWAPlannerROS/max_scaling_factor: 0.2
 * /move_base/DWAPlannerROS/max_trans_vel: 0.5
 * /move_base/DWAPlannerROS/max_vel_x: 0.5
 * /move_base/DWAPlannerROS/max_vel_y: 0.0
 * /move_base/DWAPlannerROS/min_rot_vel: 0.4
 * /move_base/DWAPlannerROS/min_trans_vel: 0.1
 * /move_base/DWAPlannerROS/min_vel_x: 0.0
 * /move_base/DWAPlannerROS/min_vel_y: 0.0
 * /move_base/DWAPlannerROS/occdist_scale: 0.5
 * /move_base/DWAPlannerROS/oscillation_reset_dist: 0.05
 * /move_base/DWAPlannerROS/path_distance_bias: 64.0
 * /move_base/DWAPlannerROS/publish_cost_grid_pc: True
 * /move_base/DWAPlannerROS/publish_traj_pc: True
 * /move_base/DWAPlannerROS/rot_stopped_vel: 0.4
 * /move_base/DWAPlannerROS/scaling_speed: 0.25
 * /move_base/DWAPlannerROS/sim_time: 1.0
 * /move_base/DWAPlannerROS/stop_time_buffer: 0.2
 * /move_base/DWAPlannerROS/trans_stopped_vel: 0.1
 * /move_base/DWAPlannerROS/vtheta_samples: 20
 * /move_base/DWAPlannerROS/vx_samples: 6
 * /move_base/DWAPlannerROS/vy_samples: 1
 * /move_base/DWAPlannerROS/xy_goal_tolerance: 0.15
 * /move_base/DWAPlannerROS/yaw_goal_tolerance: 0.3
 * /move_base/TrajectoryPlannerROS/acc_lim_theta: 1.0
 * /move_base/TrajectoryPlannerROS/acc_lim_x: 0.5
 * /move_base/TrajectoryPlannerROS/acc_lim_y: 0.0
 * /move_base/TrajectoryPlannerROS/dwa: True
 * /move_base/TrajectoryPlannerROS/gdist_scale: 0.8
 * /move_base/TrajectoryPlannerROS/heading_lookahead: 0.325
 * /move_base/TrajectoryPlannerROS/holonomic_robot: False
 * /move_base/TrajectoryPlannerROS/max_vel_theta: 0.2
 * /move_base/TrajectoryPlannerROS/max_vel_x: 0.3
 * /move_base/TrajectoryPlannerROS/max_vel_y: 0.0
 * /move_base/TrajectoryPlannerROS/meter_scoring: True
 * /move_base/TrajectoryPlannerROS/min_in_place_vel_theta: 0.2
 * /move_base/TrajectoryPlannerROS/min_vel_theta: -0.2
 * /move_base/TrajectoryPlannerROS/min_vel_x: 0.1
 * /move_base/TrajectoryPlannerROS/min_vel_y: 0.0
 * /move_base/TrajectoryPlannerROS/occdist_scale: 0.01
 * /move_base/TrajectoryPlannerROS/oscillation_reset_dist: 0.05
 * /move_base/TrajectoryPlannerROS/pdist_scale: 0.6
 * /move_base/TrajectoryPlannerROS/sim_time: 3.0
 * /move_base/TrajectoryPlannerROS/vtheta_samples: 20
 * /move_base/TrajectoryPlannerROS/vx_samples: 6
 * /move_base/TrajectoryPlannerROS/vy_samples: 1
 * /move_base/TrajectoryPlannerROS/xy_goal_tolerance: 0.15
 * /move_base/TrajectoryPlannerROS/yaw_goal_tolerance: 0.3
 * /move_base/base_global_planner: GA_planner/GAPlanner
 * /move_base/base_local_planner: dwa_local_planner...
 * /move_base/controller_frequency: 5.0
 * /move_base/controller_patience: 3.0
 * /move_base/global_costmap/bump/clearing: False
 * /move_base/global_costmap/bump/data_type: PointCloud2
 * /move_base/global_costmap/bump/marking: True
 * /move_base/global_costmap ...
(more)
edit retag flag offensive close merge delete

Comments

So that crash doesn't really tell you much, it means that in trying to use your plugin that it crashes. You'll need to produce more printouts to find where in the process it fails or use a debugger

stevemacenski gravatar image stevemacenski  ( 2019-03-25 14:50:24 -0500 )edit

yes, it means that cant go to my plugin. So do I need more printouts in my plugin or something?

huyrua291996 gravatar image huyrua291996  ( 2019-03-25 21:15:56 -0500 )edit

Yes, you should or use a debugger.

stevemacenski gravatar image stevemacenski  ( 2019-03-25 21:18:29 -0500 )edit

And can you help me to check my Cmakelists and my GA_ROS.cpp?

huyrua291996 gravatar image huyrua291996  ( 2019-03-25 21:21:00 -0500 )edit

Hi @stevemacenski, after I use gdb debugger, I got segmentations error:


Thread 1 "move_base" received signal SIGSEGV, Segmentation fault.
0x00007fffdc85bf7c in GA_planner::GAPlanner::initialize(std::__cxx11::basic_string<char, std::char_traits<char="">, std::allocator<char> >, costmap_2d::Costmap2DROS*) () from /home/huy/plan_ws/devel/lib//libga_planner_lib.so
I cant understand how it happen. Here is my code: (header file) https://paste.ofcode.org/vRQg5TcFEwSd... (source file) https://paste.ofcode.org/YeHnyA8RvcGc...

huyrua291996 gravatar image huyrua291996  ( 2019-03-27 05:36:03 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2019-03-28 01:11:03 -0500

user found his mistake in his initialization method!

edit flag offensive delete link more
0

answered 2019-03-27 23:26:19 -0500

huyrua291996 gravatar image

updated 2019-03-27 23:37:51 -0500

Thank to @stevemacenski for suggestion. After I debugged by gdb, I found some mistake about pointer in my code. And finally, I fixed it successfully. Everything works fine. Thanks. Here is my respository: https://github.com/huyrua291996/ga_pl... The code used i-path library to generate planner by GA.

edit flag offensive delete link more

Comments

Awesome! Can you mark your answer as correct so that it comes off the unanswered questions queue?

stevemacenski gravatar image stevemacenski  ( 2019-03-27 23:48:44 -0500 )edit

oh, I dont have enough points to do that...

huyrua291996 gravatar image huyrua291996  ( 2019-03-28 01:04:12 -0500 )edit

ah, because its a self answer, er, I can make an answer with your link and you can accept that. Sorry, I'm not an admin to give you extra points haha

stevemacenski gravatar image stevemacenski  ( 2019-03-28 01:10:46 -0500 )edit

it's ok. haha

huyrua291996 gravatar image huyrua291996  ( 2019-03-28 01:21:29 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2019-03-24 07:23:22 -0500

Seen: 386 times

Last updated: Mar 28 '19