Acmece / rl-collision-avoidance

Implementation of the paper "Towards Optimally Decentralized Multi-Robot Collision Avoidance via Deep Reinforcement Learning"
https://arxiv.org/abs/1709.10082
326 stars 92 forks source link

A ”segmentation error“ occurred while the program was running. #2

Closed YuanyeMa closed 4 years ago

YuanyeMa commented 5 years ago

A segmentation error occurred after the program ran for a while, and the stack was as follows.

Thread 14 "stageros" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffd67fc700 (LWP 15891)]
0x00007ffff693d979 in Stg::World::Raytrace(Stg::Ray const&) () from /opt/ros/melodic/lib/libstage.so.4.3.0
(gdb) bt
#0  0x00007ffff693d979 in Stg::World::Raytrace(Stg::Ray const&) () from /opt/ros/melodic/lib/libstage.so.4.3.0
#1  0x00007ffff6933c9a in Stg::ModelRanger::Sensor::Update(Stg::ModelRanger*) () from /opt/ros/melodic/lib/libstage.so.4.3.0
#2  0x00007ffff6934b1a in Stg::ModelRanger::Update() () from /opt/ros/melodic/lib/libstage.so.4.3.0
#3  0x00007ffff69232fd in Stg::Model::UpdateWrapper(Stg::Model*, void*) () from /opt/ros/melodic/lib/libstage.so.4.3.0
#4  0x00007ffff693effe in Stg::World::ConsumeQueue(unsigned int) () from /opt/ros/melodic/lib/libstage.so.4.3.0
#5  0x00007ffff693f08e in Stg::World::update_thread_entry(std::pair<Stg::World*, int>*) () from /opt/ros/melodic/lib/libstage.so.4.3.0
#6  0x00007ffff6b706db in start_thread (arg=0x7fffd67fc700) at pthread_create.c:463
#7  0x00007ffff59b988f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
chesternimiz commented 4 years ago

I also have this problem but it is not very often to occur. I think after the crash, you can rename the newly saved model file to the loading file name and restart the program, which will start learning based on your newest model.

Acmece commented 4 years ago

Hi, @kevin-y-ma

You can find that there is rospy.sleep() function in the content of reset_pose and reset_world.

If you make the sleep last for a longer time, it could be better.

This problem come from the code of simulator Stage. Here are some related issues and discussion that may be helpful:

Further development of Stage_ROS package may be conducted.

Welcome to fix the bug and pull a request here!

YuanyeMa commented 4 years ago

It works. thanks for your replay.