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

So Young's profile - activity

2023-01-16 23:49:43 -0500 received badge  Guru (source)
2023-01-16 23:49:43 -0500 received badge  Great Answer (source)
2022-09-25 22:32:35 -0500 marked best answer move_base generating path in unknown space

Hi, I am trying to use ROS navigation stack with RPlidar A2. currently, I am running gmapping with move_base and explore_lite so that robot can do auto-exploration and do SLAM. the problem is, even though I set allow_unkown to false in dwa_local_planner_params.yaml, the path generated by move_base is going through the unknown space (I also checked the value being false with rosparam get) Thank you for your help!

This is my costmap_common_parmas.yaml

obstacle_range: 2.5 #maximum obstale size
raytrace_range: 3.0 #robot will clear out space up to 3 meters 
footprint: [[-0.30,-0.177], [0.105,-0.177], [0.105, 0.177], [-0.30,0.177]] #not sure, from legacy
robot_radius: 0.2
inflation_radius: 0.3 #0.55

observation_sources: laser_scan_sensor 

laser_scan_sensor: {sensor_frame: laser_frame, data_type: LaserScan, topic: scan, marking: true, clearing: true}

This is my global_costmap.yaml

global_costmap:
  global_frame: map
  robot_base_frame: base_link
  update_frequency: 5.0

This is my local_costmap_params.yaml

local_costmap:
  global_frame: odom # NEW!! odom
  robot_base_frame: base_link
  update_frequency: 5.0
  publish_frequency: 2.0
  static_map: false
  rolling_window: true # will remain centered around the robot as the robot moves around
  width: 5.0 #meters
  height: 5.0
  resolution: 0.01 #tend to set them equally as the static map
  static_map: true #if we use map_sever, keep it true

and I am using dwa_local_planner and A* for global_planner.

EDIT

After accepting the answer, I worked on properly setting the costmap yaml files and now it works properly. I have played with 'track_unkown_space' param and I decided to set them like these. These are the files I have written.

common_costmap.yaml

obstacle_range: 2.5 #maximum obstale size
raytrace_range: 3.0 #robot will clear out space up to 3 meters 
footprint: [[-0.30,-0.177], [0.105,-0.177], [0.105, 0.177], [-0.30,0.177]] #not sure, from legacy
robot_radius: 0.2
inflation_radius: 0.3 #0.55

global_costmap.yaml (here, I set 'track_unkown_space' to true, since I wanted A* planner to only plan in known & free space) - make sure you load these in move_base.xml file with namespace global_costmap.

global_frame: map
robot_base_frame: base_link
update_frequency: 3.0
publish_frequency: 2.0
static_map: true #if we use map_sever, keep it true

  # obstacle_layer: {enabled: true, lethal_cost_threshold: 100, track_unknown_space: true, unknown_cost_value: -1}

  # static_layer: {enabled: true, lethal_cost_threshold: 100, track_unknown_space: true, unknown_cost_value: -1} 

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

static_layer:
  unknown_cost_value: 0 # default: 0
  lethal_cost_threshold: 100 # default: 100
  map_topic: map # default: "map"

obstacle_layer:
  combination_method: 1 #default 1, meaning we will combine the layers
  observation_sources: laser_scan_sensor
  track_unknown_space: true
  map_type: costmap
  laser_scan_sensor:
    sensor_frame: laser_frame                 # default: ""
    topic: scan               # or /scan?
    data_type: LaserScan                # default: "PointCloud"
    marking: true                       # default: true
    clearing: true                      # default: false

inflation_layer:
  inflation_radius: 0.45 # default: 0.55

local_costmap.yaml (here, I set 'track_unknown_space' to false, since DWA planner works fine with this param being false.) I got this idea from this link text

global_frame: map # NEW!! odom
robot_base_frame: base_link
update_frequency: 5.0
publish_frequency: 2.0
static_map: false
rolling_window: true # will remain centered around the robot as the robot ...
(more)
2022-09-19 17:49:42 -0500 received badge  Enlightened (source)
2021-08-10 23:39:23 -0500 received badge  Popular Question (source)
2021-08-10 19:08:56 -0500 commented question Getting rotation angle from laser data

I agree with @ijnek suggestion, acos should be used to calculate the heading error. also, regarding self.yaw, this shoul

2021-08-09 23:32:58 -0500 commented question Getting rotation angle from laser data

I'm not sure if I understood the diagram right, but isn't cosine = median/laser_right? and to get the theta angle , use

2021-07-26 07:16:50 -0500 received badge  Necromancer (source)
2021-07-22 19:55:44 -0500 answered a question Some errors when using GlobalPlanner

I had the same issue with A* making NO PATH, but after tuning global costmap inflation radius and cost scaling factor (d

2021-07-14 02:15:58 -0500 received badge  Good Answer (source)
2021-07-13 21:16:57 -0500 answered a question unable to integrate local planner plugin into move_base

Maybe try changing library path to <library path="lib/liblocal_planner_lib">? for DWA local planner, the library p

2021-07-13 21:16:57 -0500 received badge  Rapid Responder (source)
2021-07-13 09:49:33 -0500 received badge  Nice Answer (source)
2021-07-13 03:53:46 -0500 edited answer Frontier exploration in ROS noetic

if you want to do frontier exploration, explore_lite is also a similar package but it's quite easy to setup since it onl

2021-07-13 03:51:47 -0500 answered a question Frontier exploration in ROS noetic

explore_lite has noetic branch and you can just install it with apt-get.

2021-07-13 03:51:47 -0500 received badge  Rapid Responder (source)
2021-06-08 19:11:48 -0500 commented question rossrv list not listing custom services

Have you checked your ROS_PACKAGE_PATH and have sourced the setup.bash? when you try to run a node from your package (us

2021-06-08 19:11:22 -0500 commented question rossrv list not listing custom services

Have you checked your ROS_PACKAGE_PATH and have sourced the setup.bash? when you try to run a node from your package (us

2021-05-12 19:20:18 -0500 commented answer updating the map partially in a dynamic environment

Hi, I couldn't find a way to 'partially' update the previously built map. Instead, I worte a simple node that turns on t

2021-04-29 20:21:54 -0500 commented question ros node as publisher and action client error

I see, but when you said you successfully change the initial pose of the robot, did you use the topic /initialpose? if y

2021-04-29 20:21:20 -0500 commented question ros node as publisher and action client error

I see, but when you said you successfully change the initial pose of the robot, did you use the topic /initialpose? if y

2021-04-29 19:47:07 -0500 commented question ros node as publisher and action client error

also, is your robot localizing in the map well? if it's localized from AMCL, I'm not sure if it can take /initialpose an

2021-04-29 19:39:55 -0500 received badge  Commentator
2021-04-29 19:39:55 -0500 commented question ros node as publisher and action client error

<node unless="$(arg use_rosbot)" pkg="tf" type="static_transform_publisher" name="map_odom_tf" args="0 0 0 0 0 0 map

2021-04-29 19:19:34 -0500 commented question ros node as publisher and action client error

I'm not quite sure, but I believe /initialpose is subscribed by amcl and amcl will be responsible for publishing map to

2021-04-29 00:04:54 -0500 commented question ros node as publisher and action client error

Have you turned on move_base node as well? when you do 'rosnode list', what do you get?

2021-04-28 23:58:36 -0500 received badge  Famous Question (source)
2021-04-27 19:57:48 -0500 received badge  Famous Question (source)
2021-04-19 03:55:23 -0500 received badge  Citizen Patrol (source)
2021-04-16 00:19:00 -0500 marked best answer updating the map partially in a dynamic environment

Hello,

I have generated map.pgm with gmapping using teleoperation and RPLidar, and I am using this map for navigation stack. The problem is, since the environment (indoor office) changes a lot, it struggles with amcl which causes inaccurate navigation. It works okay when there are minor changes but when the desk is moved or some chairs are moved to other side, it struggles.

image description

I believe there are three possible options for this problem, (If there are other good solutions please let me know, thank you!)

  1. re generate the whole map using gmapping and teleportation -> easy but time consuming (not what I want to do)
  2. re generate the whole map using gmapping & exploration (auto-SLAM & auto-Navigation) -> couldn't find a good solution (have tried explore_lite but it kept going under the desk or get stuck due to clustered environment)
  3. use the previous map and and set some points on the map that robot should visit & update the map during this process.

I was wondering if there is a way to do the third option. I can create a node that sends out move_base goals and my navigation stack works. Is there any way to update already made map (made by gmapping) ?

Since the already-made map used by navigation stack will be published by map_server, if there is a way to update the map and then save the map by map_saver, i will be able to solve this problem. Thank you for your help!

2021-04-16 00:18:55 -0500 answered a question updating the map partially in a dynamic environment

I've done option3 , and the important thing is to localize (AMCL) & visit points (move_base) the robot with 'previ

2021-04-15 15:07:27 -0500 received badge  Nice Answer (source)
2021-04-15 02:50:51 -0500 commented question robot loaded in different positions in Gazebo and Rviz

By "using different pgm" , do you mean you changed the origin in your map.yaml file? I'm not quite familiar with Gazebo

2021-04-14 16:49:57 -0500 received badge  Teacher (source)
2021-04-08 20:32:28 -0500 answered a question robot loaded in different positions in Gazebo and Rviz

If you just want to change the robot's starting position (after you load the map), just change the origin in willow_gara

2021-04-08 20:32:28 -0500 received badge  Rapid Responder (source)
2021-03-10 02:33:46 -0500 commented question Where should I put MultiThreadedSpinner.spin() in my main function?

For those who are interested, I used AsyncSpinner instead, since MultiThreadedSpinner blocks.

2021-03-08 19:33:16 -0500 commented question Where should I put MultiThreadedSpinner.spin() in my main function?

I tested the code above and I realised, it handles the callbacks BUT the update function is not called once..

2021-03-08 18:59:13 -0500 edited question Where should I put MultiThreadedSpinner.spin() in my main function?

Where should I put MultiThreadedSpinner.spin() in my main function? HI I have a question about ros::MultiThreadedSpinner

2021-03-08 18:51:19 -0500 asked a question Where should I put MultiThreadedSpinner.spin() in my main function?

Where should I put MultiThreadedSpinner.spin() in my main function? HI I have a question about ros::MultiThreadedSpinner

2021-02-08 19:50:10 -0500 edited answer How to make a turtlebot navigate a known map until it detects an Object?

Maybe you can use some 'explore' packages using frontier method? However, I'm not sure how you are navigating in a known

2021-02-08 19:49:44 -0500 answered a question How to make a turtlebot navigate a known map until it detects an Object?

Maybe you can use some 'explore' packages using frontier method? However, I'm not sure how you are navigating in a known

2021-02-08 19:49:44 -0500 received badge  Rapid Responder (source)
2021-02-07 23:10:52 -0500 received badge  Notable Question (source)
2021-02-07 23:10:52 -0500 received badge  Popular Question (source)
2021-01-19 18:18:25 -0500 answered a question robot_localization transform warning

Hi, Your warning says the transform from base_footprint to map was unavailable, so maybe you should check the rqt tf tr

2021-01-19 18:18:25 -0500 received badge  Rapid Responder (source)