Can Navigation avoid obstacle not in the map, indoor rtab?

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Can Navigation avoid obstacle not in the map, indoor rtab?

zelda
As I mentioned on the subject, is there way for my robot to avoid the obstacle which suddenly appeared,
so not on the map, during the navigation? (indoor, using rtab navigation.
http://wiki.ros.org/rtabmap_ros/Tutorials/MappingAndNavigationOnTurtlebot)

Watching this video, https://www.youtube.com/watch?v=X885QsH0szo
if I just see the left one of two 2D maps, the robot avoids the obstacle appeared on the sight. Is it avoiding via
3d map, or just because the obstacle is already registered on the map(right side one)?

If it is necessary, should I change the code of mobile_base?
Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: Can Navigation avoid obstacle not in the map, indoor rtab?

matlabbe
Administrator
Hi,

The navigation example is based on move_base, so yes it should avoid dynamic obstacles appearing in front of the robot (e.g., avoiding people). See local costmap and local planner of the navigation stack.

In the video, only the global costmap is shown, but the local costmap is also used.

cheers
Reply | Threaded
Open this post in threaded view
|

Re: Can Navigation avoid obstacle not in the map, indoor rtab?

zelda
Thank you! Now I could check if it avoids dynamic obstacle, and it did! ( I suddenly showed up  during the navigation. Turtlebot paused for a moment, and rotated around me and go normally.)

By the way, I have a question. Since the  "2D navigation we did with rtabmap, via rviz"(shown in http://wiki.ros.org/rtabmap_ros/Tutorials/MappingAndNavigationOnTurtlebot) uses move_base, is the algorithm for planning same with algorithms used in python file in "http://learn.turtlebot.com/2015/02/01/10/" here? Looking at go_forward_and_avoid_obstacles.py file, I could see that they uses "simpleActionClient" with "move_base".

The reason I am asking because I want to perform the same performance as "2D navigation via RViz(with rtabmap)" by code, but when I did following the code there, it was quite different.

It moved, planned similarly when no noticable obstacle was present. But, when I used dynamic obstacle, it was very fuzzed, even (often) showing Aborted navigation error.(In contrast, with RViz 2D navigation, it almost goes well, with dynamic obstacle avoiding).

1) Are they fundamentally similar to each other?
2) Is there way to earn code that could perform same/similar with the performance by "2D navigation in RViz"?
Reply | Threaded
Open this post in threaded view
|

Re: Can Navigation avoid obstacle not in the map, indoor rtab?

matlabbe
Administrator
Hi,

In your link you posted, the nodes are publishing directly cmd_vel to robot controller. There is no obstacle avoidance. It is like I close my eyes and I move 1 meter forward.

In contrast when using move_base, we set goals and move_base sends cmd_vel messages depending on the obstacles detected to reach that goal. If you want to go forward, you can drop goals 1 meter in front of the robot each second for example, and if there is an obstacle, move_base will avoid it.

EDIT: ok just saw the repository, they are doing like I said in the second paragraph. Note that if a dynamic obstacle appears on the goal, the planner may fail (goal is unreachable).

cheers
Reply | Threaded
Open this post in threaded view
|

RE: Re: Can Navigation avoid obstacle not in the map, indoor rtab?

zelda
This post was updated on .
Oh, actually in goforward.py, it just moves the robot, but in the files such as goforward_and_avoid_obstacle.py and go_to_specific_point_on_map.py, it seemed to use move_base. So I thought go_to_specific_point_on_map.py could do the same thingas Rviz, but in performance it fell short. I thought that difference is because you also made the 2D navigation (via Rviz) code. Reason of thinking like that was because when I did the 2D navigation without rtabmap, it seemed not to avoid dynamic obstacle, so I supposed they(with rtabmap and without) used different algorithm(code). Anyway haven't ever heard about the code?.. like 2D navigation at rviz with rtabmap. If it uses move_base, does that means it follows same algorithm with others also using move_base?(According to http://wiki.ros.org/move_base, I think it should. Would the fact that 2D navigation without rtabmap doesn't use point cloud be the reason of not being able to avoid dynamic obacles?)(Also, there I only find Laser scan and point clouds. Is the RGB and Depth image reflected in point clouds? If so, isn't the order Image -> Point cloud -> navigation take time for suddenly showing up dynamic obstacle? When I do the navgiation, sometimes when it curve around,it fails to avoid obstacle that is not seen before but shows up right after turning.)Thank you. I with it doesn't bother your time.
Reply | Threaded
Open this post in threaded view
|

RE: Re: Can Navigation avoid obstacle not in the map, indoor rtab?

zelda
Also, when I see the Pi robot video, the camera is sticked very high. Is there reason for that?

Explain) In case of my robot during the navigation, most of the problem is small objects on the ground. So at first I
located camera at the top of the Turtlebot but now I moved it to lower position. But yet I can't feel any difference...
Because meeting objects right after turning the curve, it seems moving camera height isn't related.
Reply | Threaded
Open this post in threaded view
|

RE: Re: Can Navigation avoid obstacle not in the map, indoor rtab?

matlabbe
Administrator
Hi,

The scripts are sending poses to move_base. It should not have any difference between goals sent by the scripts and the ones sent using RVIZ. However, in both cases, rtabmap should be running to provide the map to move_base.

The height of the camera is not important in general for mapping or navigation. However, on Turtlebot, the fake laser scan from the kinect is used for the obstacle layer (see here) used by move_base. In this case, you should put the camera lower to be able to detect obstacles. The Pi Robot is using a LiDAR on its base, so its camera can be set higher. You can see here that the fake laser scan is using the points on the center horizontal line (10 pixels wide) of the depth image of the camera. So if the camera is 30 cm over the ground, it will not detect obstacles under 25/30 cm.

For a better segmentation of the obstacles for the costmap, you can look at this move_base parameters that we use on our robot (in particular the obstacle and ground clouds):
- obstacle_layer: link
- obstacles_detection nodelet: link

For debugging, I recommend to show the local costmap and global costmap used by move_base in RVIZ.

cheers
Reply | Threaded
Open this post in threaded view
|

RE: Re: Can Navigation avoid obstacle not in the map, indoor rtab?

zelda
Oh, thank you about the camera related info, and values! I'll try that.

Hmm.. then it means I should check if it is using rtabmap when I run it with script.
Do you have any idea about this..? I never saw things related to rtabmap during that tutorial..

Always thank you.
Reply | Threaded
Open this post in threaded view
|

RE: Re: Can Navigation avoid obstacle not in the map, indoor rtab?

matlabbe
Administrator
For example, if you bring up Turtlebot using the tutorial on rtabmap_ros's wiki, you would be able to use python scripts directly. Just make sure that the scripts can find move_base node (remap topics if necessary) and they should be able to send goals to it (using actionlib from move_base).

I think their tutorial can be done with any mapping approaches. They may use gmapping by default like the official Turtlebot navigation tutorial.

cheers
Reply | Threaded
Open this post in threaded view
|

RE: RE: Re: Can Navigation avoid obstacle not in the map, indoor rtab?

zelda
This post was updated on .
Okay, can I ask simple questions??I found the nodelet files. How can I use it??According to the link you gave me about obstacles_detection, is it just visualizing the obstacles, or help the navigation if the node is turned on with the other nodes?
Reply | Threaded
Open this post in threaded view
|

RE: RE: Re: Can Navigation avoid obstacle not in the map, indoor rtab?

zelda
I did sudo apt-get remove rtabmap_ros and re installed the file (only in the WS) for some reason,
and now when I try to download the map via rviz, I see this error.

[ERROR] [1463488181.047780959]: MapCloudDisplay: Can't call "/rtabmap/get_map" service. Tip: if rtabmap node is not in rtabmap namespace, you can remap the service to "get_map" in the launch file like: <remap from="rtabmap/get_map" to="get_map"/>.

Do you know about this?

The reason for the re installation was there wasn't nodelet folder in my /opt/ros/indigo/share/rtabmap_ros directory,
like the one in https://github.com/introlab/rtabmap_ros (my folder is just the state of sudo apt-get install ros-indigo-rtabmap-ros)

I followed the lower part of the github,(the same site to right upper noticated) and now I have those in catkin_ws folder, but
how can I use it..?(silly question but don't know how)
Reply | Threaded
Open this post in threaded view
|

RE: RE: Re: Can Navigation avoid obstacle not in the map, indoor rtab?

matlabbe
Administrator
This post was updated on .
Hi,

The links of this post show how to use the obstacles_detection nodelet. The nodelets should be already installed by the binaries (ros-indigo-rtabmap-ros). They are included in librtabmap_ros.so library and defined in nodelets.xml, there is no "nodelets" folder required to use them.

More info about nodelets here: http://wiki.ros.org/nodelet
How setup an obstacle layer of move_base here: http://wiki.ros.org/navigation/Tutorials/RobotSetup

cheers
Reply | Threaded
Open this post in threaded view
|

RE: RE: Re: Can Navigation avoid obstacle not in the map, indoor rtab?

zelda
This post was updated on .
Thank you! Now I feel how to use it.

By the way, sorry for silly quesion, but could you reply for the question that I wrote here?
at May 17, 2016; 10:15pm, right above.

I re installed rtabmap only in WS and it is currently not working well downloading the map..

I wanted to check if the version of rtabmap in WS and Turtlebot is different, but don't know how.

1) I made a new map with the current setting, but same error occurs when I press the box.
2) I tried "$roslaunch rtabmap_ros demo_turtlebot_rviz.launch /rtabmap/get_map:=/get_map", but nothing changed.