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

sonali's profile - activity

2017-10-30 03:32:08 -0500 received badge  Famous Question (source)
2015-12-07 06:44:29 -0500 received badge  Famous Question (source)
2015-11-19 10:07:49 -0500 received badge  Famous Question (source)
2015-10-19 02:16:48 -0500 received badge  Notable Question (source)
2015-08-12 13:41:17 -0500 received badge  Notable Question (source)
2015-07-24 13:35:36 -0500 commented answer obtain a copy of the global_costmap

Thanks @David! Is there any way to get this data as a costmap_2d::Costmap2D_ROS object so that I can take advantage of its functions like @Naman asked?

2015-07-24 12:39:44 -0500 commented answer obtain a copy of the global_costmap

I have a similar problem. But subscribing to global_costmap/costmap will give the original map and not the occupancy grid that is obtained after updating it with sensor data. Is there any way to access the updated costmap in a node?

2015-07-23 13:38:12 -0500 received badge  Popular Question (source)
2015-07-23 09:35:36 -0500 received badge  Editor (source)
2015-07-22 16:33:36 -0500 asked a question Error in initializing costmap - does not name a type

Hi everyone,

I am writing a node in which I need to use the cost map. The following two lines show how I initialized the cost map and used the start() function.

tf::TransformListener tf1(ros::Duration(10));    
costmap_2d::Costmap2DROS* costmap_ros = new costmap_2d::Costmap2DROS("global_costmap", tf1);
costmap_ros->start();

But when I compile it, I get the following error -

/home/sonali/catkin_ws/src/dr_wheelchair/wall_follower/src/wall_follower.cpp:71:1: error: ‘costmap_ros’ does not name a type
 costmap_ros->start();
 ^
make[2]: *** [dr_wheelchair/wall_follower/CMakeFiles/wall_follower.dir/src/wall_follower.cpp.o] Error 1
make[1]: *** [dr_wheelchair/wall_follower/CMakeFiles/wall_follower.dir/all] Error 2
make: *** [all] Error 2
Invoking "make -j4 -l4" failed

Why does it say 'does not name a type' when I name it in just the previous line? What am I doing wrong?

I get the same error when I use the getRobotPose() function.

tf::Stamped<tf::Pose> global_pose;
costmap.getRobotPose(global_pose);

However, the program compiles without any errors when I try the getCostmap() function

costmap_2d::Costmap2D* costMapPointer = costmap.getCostmap();

These are the files i've included

#include "ros/ros.h"
#include "sensor_msgs/Range.h"
#include "geometry_msgs/Twist.h"
#include <costmap_2d/costmap_2d_ros.h>
#include <costmap_2d/costmap_2d.h>
#include <tf/transform_listener.h>
#include <iostream>
#include <string>

and I have included costmap_2d in the catkin required components of CMakeLists

Please let me know if you need more information to answer the question.

Thanks!

2015-07-06 12:56:37 -0500 received badge  Notable Question (source)
2015-06-26 04:52:34 -0500 received badge  Popular Question (source)
2015-06-12 10:45:57 -0500 received badge  Enthusiast
2015-06-11 16:14:22 -0500 asked a question Why is there a time delay between the map update and re-planning?

Hi everyone,

I'm using the navigation stack with the SBPL Lattice Planner (ARA planner) as the global planner and Trajectory planner as the local planner on a robot. The local cost map can see till 2.5 m in front of it.

When I start the robot and give it a goal a few meters away, it plans a path to it. As it moves, and an obstacle comes within 2.5 m of it, it updates the local cost map and plans a new path. However, there is a significant time delay between the map getting updated and the generation of a new plan because of which the robot sometimes follows its old path till its too near the obstacle to be able to maneuver around it. When I check the SBPL Planner stats that are published, it shows that the re-planning took only 2-3 seconds (the time limit is 3 seconds at the end of which it gives a path even if it is sub-optimal). But time delay between map update and new plan generation is around 4-5 seconds. What is it between the map update and the new plan generation that is taking so much time?

The delay is less when the obstacle is small/narrow and more when the obstacle is wide. So it seems like the part that is causing the delay is dependent on the size of the obstacle.

Please let me know if you need any more information to answer the question.

2015-04-14 18:55:33 -0500 received badge  Popular Question (source)
2015-04-10 17:26:52 -0500 asked a question Dynamically changing the origin of costmap2D

Hello everyone,

For a project I'm working on, we are using only the dwa_local_planner from the navigation stack. We generate and publish our own occupancy grid as a nav_msgs::OccupancyGrid message and give it to costmap2D. However, the origin of the occupancy grid and thus the costmap2D needs to change dynamically as the robot moves. What is a good way to change the origin of the cost map which it seems to be pulling from the costmap2D config file each time? Will the OccupancyGrid message change it automatically since I will be publishing the dynamically changing origin as a part of the map meta data in the message?