turtlebot_exploration_3d icon indicating copy to clipboard operation
turtlebot_exploration_3d copied to clipboard

about the code

Open pineappleKID opened this issue 4 years ago • 0 comments
trafficstars

line 293 - line 306 of the file turtlebot_exploration_3d.cpp is

        Candidates_pub.publish(CandidatesMarker_array);
        CandidatesMarker_array.markers.clear();
        candidates.clear();

        // loop in the idx_MI, if the candidate with max MI cannot be achieved, 
        // switch to a sub-optimal MI.
        arrived = false;
        int idx_ptr = 0;

        while (!arrived) {
            // Setup the Goal
            next_vp = point3d(candidates[idx_MI[idx_ptr]].first.x(),candidates[idx_MI[idx_ptr]].first.y(),candidates[idx_MI[idx_ptr]].first.z());
            Goal_heading.setRPY(0.0, 0.0, candidates[idx_MI[idx_ptr]].second.yaw());
            Goal_heading.normalize();

I also show the code block as an image

image

Since candidates is used in line 304, we should not clear candidates in line 295

pineappleKID avatar Dec 09 '20 11:12 pineappleKID