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

Jam's profile - activity

2021-04-19 09:35:23 -0500 received badge  Famous Question (source)
2019-03-01 12:33:45 -0500 marked best answer [costmap] memory out of bounds when costmap do initMaps

Dear all,
I am using costmap and frontier_exploration for my robot autonomous exploration.
Now I encountered a costmap memory of bounds problem when static layer do incomingMap function.
(the error log shows "corrupted double-linked list" or "free(): invalid next size (normal)")

my costmap_2d version: 1.12.13 (2016-08-15)

I add "launch-prefix="valgrind --tool=memcheck --leak-check=full" in my launch file in order to get more detail log.
here is part of log:

==1806== Invalid write of size 1
==1806==    at 0x4FB5AF8: costmap_2d::CostmapLayer::updateWithTrueOverwrite(costmap_2d::Costmap2D&, int, int, int, int) (costmap_layer.cpp:85)
==1806==    by 0x13DFBC1F: costmap_2d::StaticLayer::updateCosts(costmap_2d::Costmap2D&, int, int, int, int) (static_layer.cpp:300)
==1806==    by 0x4F5273D: costmap_2d::LayeredCostmap::updateMap(double, double, double) (layered_costmap.cpp:137)
==1806==    by 0x4F59134: costmap_2d::Costmap2DROS::updateMap() (costmap_2d_ros.cpp:429)
==1806==    by 0x4F5894C: costmap_2d::Costmap2DROS::mapUpdateLoop(double) (costmap_2d_ros.cpp:389)
==1806==    by 0x4FA098E: boost::_mfi::mf1<void, costmap_2d::Costmap2DROS, double>::operator()(costmap_2d::Costmap2DROS*, double) const (mem_fn_template.hpp:165)
==1806==    by 0x4F9F49A: void boost::_bi::list2<boost::_bi::value<costmap_2d::Costmap2DROS*>, boost::_bi::value<double> >::operator()<boost::_mfi::mf1<void, costmap_2d::Costmap2DROS, double>, boost::_bi::list0>(boost::_bi::type<void>, boost::_mfi::mf1<void, costmap_2d::Costmap2DROS, double>&, boost::_bi::list0&, int) (bind.hpp:313)
==1806==    by 0x4F9DF04: boost::_bi::bind_t<void, boost::_mfi::mf1<void, costmap_2d::Costmap2DROS, double>, boost::_bi::list2<boost::_bi::value<costmap_2d::Costmap2DROS*>, boost::_bi::value<double> > >::operator()() (bind_template.hpp:20)
==1806==    by 0x4F9A7A9: boost::detail::thread_data<boost::_bi::bind_t<void, boost::_mfi::mf1<void, costmap_2d::Costmap2DROS, double>, boost::_bi::list2<boost::_bi::value<costmap_2d::Costmap2DROS*>, boost::_bi::value<double> > > >::run() (thread.hpp:117)
==1806==    by 0x66D5A49: ??? (in /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.54.0)
==1806==    by 0x68E8183: start_thread (pthread_create.c:312)
==1806==    by 0x61E8FFC: clone (clone.S:111)
==1806==  Address 0x16e0b7a0 is 0 bytes after a block of size 135,168 alloc'd
==1806==    at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==1806==    by 0x4F3D071: costmap_2d::Costmap2D::initMaps(unsigned int, unsigned int) (costmap_2d.cpp:71)
==1806==    by 0x4F3D915: costmap_2d::Costmap2D::resizeMap(unsigned int, unsigned int, double, double, double) (costmap_2d.cpp:91)
==1806==    by 0x4F51996: costmap_2d::LayeredCostmap::resizeMap(unsigned int, unsigned int, double, double, double, bool) (layered_costmap.cpp:71)
==1806==    by 0x13DFB26F: costmap_2d::StaticLayer::incomingMap(boost::shared_ptr<nav_msgs::OccupancyGrid_<std::allocator<void> > const> const&) (static_layer.cpp:182)
==1806==    by 0x13E07895: boost::_mfi::mf1<void, costmap_2d::StaticLayer, boost::shared_ptr<nav_msgs::OccupancyGrid_<std::allocator<void> > const> const&>::operator()(costmap_2d::StaticLayer*, boost::shared_ptr<nav_msgs::OccupancyGrid_<std::allocator<void> > const> const&) const (mem_fn_template.hpp:165)
==1806==    by 0x13E06A03: void boost::_bi::list2<boost::_bi::value<costmap_2d::StaticLayer*>, boost::arg<1> >::operator()<boost::_mfi::mf1<void, costmap_2d::StaticLayer, boost::shared_ptr<nav_msgs::OccupancyGrid_<std::allocator<void> > const> const&>, boost::_bi::list1<boost::shared_ptr<nav_msgs::OccupancyGrid_<std::allocator<void> > const> const&> >(boost::_bi::type<void>, boost::_mfi::mf1<void, costmap_2d::StaticLayer, boost::shared_ptr<nav_msgs::OccupancyGrid_<std::allocator<void> > const> const&>&, boost::_bi::list1<boost::shared_ptr<nav_msgs::OccupancyGrid_<std::allocator<void> > const> const&>&, int) (bind.hpp:313)
==1806==    by 0x13E05FC1: void boost ...
(more)
2019-01-15 06:13:28 -0500 received badge  Notable Question (source)
2018-04-06 02:43:37 -0500 received badge  Popular Question (source)
2018-02-15 16:26:29 -0500 received badge  Self-Learner (source)
2018-02-12 03:01:33 -0500 answered a question [costmap] memory out of bounds when costmap do initMaps

I think I found the out of memory crash reason. when costmap do layered_costmap_->resizeMap() in static_layer incomi

2018-02-09 03:48:48 -0500 asked a question [costmap] memory out of bounds when costmap do initMaps

[costmap] memory out of bounds when costmap do initMaps Dear all, I am using costmap and frontier_exploration for my rob

2017-03-28 02:49:20 -0500 received badge  Famous Question (source)
2017-02-20 04:06:00 -0500 received badge  Notable Question (source)
2017-02-20 04:06:00 -0500 received badge  Popular Question (source)
2017-02-17 09:28:11 -0500 received badge  Famous Question (source)
2017-02-07 06:51:54 -0500 received badge  Famous Question (source)
2016-11-08 05:45:24 -0500 asked a question decomposition coverage path planning

Hi all,
Currently I am using the following resource to implement my coverage path planning,

And I can achieve a simple coverage path planning demo like left side image in this link( coverage path planning).

Now I need to implement the decomposition function for my coverage path planning algorithm.
(like right side in previous image link)

I have try some keywords (cell by cell, block, partition, decomposition + coverage path planning),
but so far without success...

Are there any resources, packages or papers have already provide this kind of algorithm,
So the robot can do coverage path planning "cell by cell" and don't need to input a map in advance?
Or any suggestion about how to implement this kind of algorithm?
Thanks!

2016-11-01 23:50:33 -0500 commented question [tf]different laser position for obstacle avoidance

Hi, @gijsje170
Tutorial senario is a 360 laser on the center top of the robot.
and calculate the distance between robot and wall,
so if your want use kinect, the kinect might be set to face wall.
also with some code modification, you should able to do wall following alg.

2016-11-01 23:42:27 -0500 received badge  Famous Question (source)
2016-10-31 22:53:30 -0500 received badge  Notable Question (source)
2016-10-31 20:36:39 -0500 commented question [tf]different laser position for obstacle avoidance

@gijsje170
the code has some "style", after correction it should be fine.
ex:
rangeslink -> ranges[i],
diffE = (distMin - wallDistance) - r -> diffE = (distMin - wallDistance) - e

2016-10-15 13:24:07 -0500 received badge  Popular Question (source)
2016-10-13 20:23:07 -0500 asked a question [tf]different laser position for obstacle avoidance

Hi all,
Currently I am following this tutorial to implement the wall following algorithm,
During the wall following stage, I need to do the obstacle avoidence.
When the laser position is puttedd on the center of the robot,
Its simple to know robot hits obstacle when one of laser range is smaller than robot radius.

But when it move front about 10cm.(because of the robot design)
It becames difficult to calculate the obstacle distance.

different laser position.jpg

I have some simple ideas about this problem:
(1) correct every laser ray by multiple some coeffcients (sin, cos..)
- cpu loading too high?
(2) use other senor (ultrasonic, ir...etc) and put on the side of robot
- may have some blind range?
(3) custom a costmap to calculate the obstacle distance from robot
- resolution need to 0.5cm, is it possible?

Does anyone know how to do obstacle when laser position is not on the center of robot?
Thanks!

2016-10-12 04:47:31 -0500 received badge  Famous Question (source)
2016-10-09 07:10:44 -0500 received badge  Notable Question (source)
2016-09-19 03:21:30 -0500 received badge  Popular Question (source)
2016-09-19 01:49:17 -0500 answered a question [costmap] costmap doesnt rotate to align the static map

http://answers.ros.org/question/22452...

using the move_base/clear_costmaps service of move_base solve my problem!

2016-09-08 21:56:37 -0500 asked a question [costmap] costmap doesnt rotate to align the static map

Dear all,
I am using frontier_exploration+rtabmap slam+move_base for my robot autonomous exploration.

I have question about how costmap work?
Because when the slam algorithm do some mapping job.
(means map-> odom tf will be changed, and static map will rotate / shift I guess...)

( https://drive.google.com/file/d/0Bw2w... )
The static will rotate in the above picture.
But the costmap doesn't rotate to match the static.
It just add new inflation to costmap.
Does anyone how to make the costmap rotate with static map , or make the "old" costmap disappear?

common_costmap_params.yaml

# robot shape
robot_radius: 0.17

static_layer:
    map_topic: /map
    # first_map_only: false
    # subscribe_to_updates: false
    # track_unknown_space: true
    # use_maximum: false
    # lethal_cost_threshold: 100
    # unknown_cost_value: -1
    # trinary_costmap: true

obstacle_layer:
    track_unknown_space: true
    # transform_tolerance: 0.2
    observation_sources: laser_scan_sensor
    laser_scan_sensor: 
        topic:                      /center/laser_scan
        # sensor_frame:               "" # leave empty to read from sensor data
        # observation_persistence:    0.0
        # expected_update_rate:       0.0
        data_type:                  LaserScan
        # min_obstacle_height:        0.0
        # max_obstacle_height:        2.0
        inf_is_valid:               true
        clearing:                   true
        marking:                    true
        obstacle_range:             3.0 # laser_max_range
        raytrace_range:             3.0 # laser_max_range

inflation_layer:
    inflation_radius: 0.25
    cost_scaling_factor: 0.0

global_costmap_params.yaml

global_costmap:
    # global_frame: map
    # robot_base_frame: base_link

    # rolling_window: false
    # track_unknown_space: false
    # always_send_full_costmap: false

    # pose_update_frequency: 10.0

    update_frequency: 1.0 # 5
    publish_frequency: 0.5 # 0
    transform_tolerance: 0.5 # 0.3

    # width: 10.0
    # height: 10.0
    # resolution: 0.05
    # origin_x: 0
    # origin_y: 0

    plugins: 
        # WARNING!! This order of layers (s->o->i) cant not be change
        - {name: static_layer,     type: "costmap_2d::StaticLayer"}
        - {name: obstacle_layer,   type: "costmap_2d::ObstacleLayer"}
        - {name: inflation_layer,  type: "costmap_2d::InflationLayer"}

local_costmap_params.yaml

local_costmap:
    global_frame: odom
    # robot_base_frame: base_link

    rolling_window: true
    # track_unknown_space: false
    # always_send_full_costmap: false

    # pose_update_frequency: 10.0

    update_frequency: 5.0 # 5
    publish_frequency: 2.0 # 0
    transform_tolerance: 0.5 # 0.3

    width: 3.0 
    height: 3.0 
    resolution: 0.05
    # origin_x: 0
    # origin_y: 0

    plugins: 
        - {name: obstacle_layer,   type: "costmap_2d::ObstacleLayer"}
        - {name: inflation_layer,  type: "costmap_2d::InflationLayer"}

    inscribed_radius: 0.17
    circumscribed_radius: 0.17
2016-09-08 21:31:57 -0500 received badge  Notable Question (source)
2016-09-04 09:52:38 -0500 received badge  Nice Answer (source)
2016-08-23 02:47:35 -0500 received badge  Popular Question (source)
2016-08-21 20:44:43 -0500 received badge  Supporter (source)
2016-08-17 01:48:47 -0500 received badge  Enthusiast
2016-08-12 04:19:45 -0500 received badge  Student (source)
2016-08-11 04:55:31 -0500 received badge  Notable Question (source)
2016-08-10 21:11:25 -0500 asked a question [frontier_exploration] update explore boundary dynamically

Dear all,
I am using frontier_exploration and rtabmap for my robot autonomous exploration.
Now I can send a goal to explore_server without boundary and start to explore.

I notice that the frontier_exploration will set a default boundary
------> the static map (/map) boundary provided by rtabmap package.

But the static map provide by rtabmap will grow when the robot go to new place.
Is there any parameter can be adjust, and let the explore costmap boundary will adjust periodically?
image description

2016-08-10 20:46:17 -0500 received badge  Necromancer (source)
2016-08-10 20:46:17 -0500 received badge  Teacher (source)
2016-08-10 20:19:55 -0500 answered a question Turtlebot + Frontier Exploration: Turning in Place at the Start

Try turn off the robot model (show footprint instead) and turn on the frontiers (point cloud) in rviz.
And observe how the explore algorithm discover and choose the frontiers.
There are three parameter about how to choose frontier as a goal to navigation. (closet, middle, centroid).

the error message is about the base_local_planner can not find the target cells,
try to git clone the navigation code and check how to adjust the planner parameters.

Hope this can help. :)

2016-08-10 19:53:21 -0500 commented answer [move_base] want to completely follow the global path

Thank you, David!
Set pdist_scale up to 11 works!
The robot will rotate first, then almost follow the path!
Thanks for your kindly help again :)

2016-08-10 19:48:59 -0500 received badge  Scholar (source)
2016-08-10 12:54:42 -0500 received badge  Popular Question (source)
2016-08-10 06:54:47 -0500 asked a question [move_base] want to completely follow the global path

Dear all,
I am using move_base for my robot navigation,
and following the tuning tutorial to adjust my yaml file which used in base_local_planner.
ex:
pdist_scale:1.0
gdist_scale:0.5
But my local plan path is doesn't not follow the global path completely.
image description
Is there any advice for tunning these parameter?
EX: rotate to direction first. Demo video of completely follow the global path