Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filter_tracks_confirmed crashes #97

Open
kaushikbalasundar opened this issue May 6, 2021 · 1 comment
Open

filter_tracks_confirmed crashes #97

kaushikbalasundar opened this issue May 6, 2021 · 1 comment

Comments

@kaushikbalasundar
Copy link

kaushikbalasundar commented May 6, 2021

Hello!

I am using a realsense camera to run only the upper body detector. While everything works as it should when initially launched, I get the following error after about 2-3 minutes and the filter_tracks_confirmed_by_by_HOG dies. What could be the issue?

[spencer/perception_internal/people_tracking/post_processing/filter_tracks_confirmed_by_HOG-33] process has died [pid 6199, exit code -11, cmd /opt/ros/melodic/lib/spencer_tracking_utils/filter_visually_confirmed_tracks input_tracks:=/spencer/perception/tracked_persons_orientation_fixed output_tracks:=/spencer/perception/tracked_persons_confirmed_by_HOG composite_detected_persons:=/spencer/perception/detected_persons_composite __name:=filter_tracks_confirmed_by_HOG __log:=/home/ugv01/.ros/log/06b55506-ae34-11eb-8939-1c697a66977f/spencer-perception_internal-people_tracking-post_processing-filter_tracks_confirmed_by_HOG-33.log]. log file: /home/ugv01/.ros/log/06b55506-ae34-11eb-8939-1c697a66977f/spencer-perception_internal-people_tracking-post_processing-filter_tracks_confirmed_by_HOG-33*.log [spencer/perception_internal/people_tracking/post_processing/filter_tracks_confirmed_by_upper_body-34] process has died [pid 6206, exit code -11, cmd /opt/ros/melodic/lib/spencer_tracking_utils/filter_visually_confirmed_tracks input_tracks:=/spencer/perception/tracked_persons_orientation_fixed output_tracks:=/spencer/perception/tracked_persons_confirmed_by_upper_body composite_detected_persons:=/spencer/perception/detected_persons_composite __name:=filter_tracks_confirmed_by_upper_body __log:=/home/ugv01/.ros/log/06b55506-ae34-11eb-8939-1c697a66977f/spencer-perception_internal-people_tracking-post_processing-filter_tracks_confirmed_by_upper_body-34.log]. log file: /home/ugv01/.ros/log/06b55506-ae34-11eb-8939-1c697a66977f/spencer-perception_internal-people_tracking-post_processing-filter_tracks_confirmed_by_upper_body-34*.log

@kaushikbalasundar kaushikbalasundar changed the title filter_tracks_confirmed_by_HOG crashes filter_tracks_confirmed crashes May 6, 2021
@BIRL-xu
Copy link

BIRL-xu commented Mar 17, 2023

I found this issue caused by erasing the std::map with a wrong way here
The issue codes(commented the issue by me):

    for(std::map<track_id, ros::Time>::const_iterator trackIt = g_trackLastSeenAt.begin(); trackIt != g_trackLastSeenAt.end(); trackIt++) {
        if(currentTime - trackIt->second > ros::Duration(5.0) || currentTime < trackIt->second) {
            track_id trackId = trackIt->first;
            g_trackLastSeenAt.erase(trackId); // trackIt is invalid after erase.
            g_actualMatchesPerTrackAndModality.erase(trackId);
            g_confirmedTracks.erase(trackId);
        }
    }

, and I modified that to

    for(std::map<track_id, ros::Time>::const_iterator trackIt = g_trackLastSeenAt.begin(); trackIt != g_trackLastSeenAt.end();) {
        if(currentTime - trackIt->second > ros::Duration(5.0) || currentTime < trackIt->second) {
            track_id trackId = trackIt->first;
            trackIt = g_trackLastSeenAt.erase(trackIt);
            g_actualMatchesPerTrackAndModality.erase(trackId);
            g_confirmedTracks.erase(trackId);
        }
        else
        {
            trackIt++;
        }

, the crash disappeared!
May be it is a bug? @tlind

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants