skasperski / navigation_2d

ROS nodes to navigate a mobile robot in a planar environment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Exploration doesn't work if i add another robot to simulation

aditi741997 opened this issue · comments

I have been going through the nav2d tutorials : http://wiki.ros.org/nav2d/Tutorials . TUtorial 3 is working perfectly fine. I even created a model in stage and added a small square [i.e. static obstacle], and the autonomous exploration still works correctly. The robot explores the whole map.

Now, I wanted to add dynamic obstacles. I tried setting the velocity for the model I added, within the .inc file, but the object stays stationary. I am now trying to add another robot as a dynamic obstacle. I have navigator, mapper and operator nodes for robot_0, and I'm trying to control robot_1 from the terminal [by giving cmd_vel commands]. I have updated the costmap.yaml file as follows : global_frame: robot_0/odom robot_base_frame: robot_0/base_link. I also had to update the function bufferCloud in observation_buffer.cpp to be able to transform the incoming scan which is in frame /robot_0/base_Scan. [by removing the initial '/'].

The issue I'm facing is, that, I first call the service robot_0/StartMapping, which works fine, but then, when I call robot_0/StartExploration,the exploration stops very quickly(just a small part of the map is explored) , and the output is either 'Exploration has finished' or 'Exploration failed' [less common]. This happens regardless of where the second robot (i.e. robot_1) is.

Just to clarify, i don't want to use robot 1 for exploration - i just want to add it as an obstacle and control it by giving cmd_vel commands.

What does the map look like when it says exploration finished?