Magni move base, does it work properly?

Hi Ubiquityrobotics, All,

I’m trying to use move base (path planners) with Magni in a Gazebo enviroment,

first question is are the parameters tweaked to optimal? (below, say for global costmap, local costmap and common costmap, they seem to be different from default values inside and not sure how you came up with them…)

Reason I ask is when I launch the move base node with the parameters above, Magni does not move at all when I send a 2D nav Goal (and yes I had done localization already with AMCL and the laser seems correctly boucing off the walls…) but it wont just move at all, and errors below, Magni just stuck there,

I switched on recovery_behaviour_enabled: true in the move base and that didnt help either…,

Please assist

Tried both navfn and carrot planner and that didnt help as well…, got frustrated,

Okay, so i am not part of the magni people, but my guess would be that maybe you can adjust the cost value in the code.

If I understood correctly, it seems like that the cost value is not allowing the magni to make a decision on adjusting itself. So, give it a shot at adjusting the code ands see what happens? Or maybe spawn the magni somewhere else

It looks like it’s registering a potential collision there. If I recall right there’s some kind of bug in gazebo where the lidar would detect parts of the robot despite them not being in line of sight at all. Have you tried using laser filters with a box filter to remove scan points that hit the robot? That might do it.

1 Like

ok, that kind of make sense, when you mention the cost value, do you mean adjusting the cost scaling parameter below for the global cost map and local cost map?

Hi All, Ubiquity Robot,

Ok I got further since I haven’t got any replies to my previous question,

I loaded a few simple obstacles from Magni to navigate around ,

First set of planners I used are:

  1. base_global_planner > navfn/NavfnROS

  2. base_local_planner > dwa_local_planner/DWAPlannerROS

and it does avoid the obstacle and goes around it which is great but but… …when everytime i send a 2D nav goal to it …, it thinks for like 30 seconds before it can figure out a path to go … why is that please? and what parameter I need to adjust here? I’m lost now…,

Second set of planners I used (which is by defaults for the local planner) are:

  1. base_global_planner > navfn/NavfnROS
  2. base_local_planner > TrajectoryPlannerROS

It responded faster with this set of planners , however as you can see below, Magni just crashes to the obstacle , it tries to rotate recovery several times but fails…,

I would of thouht that TrajectoryPlannerROS would work better but it just hits the obstacle…,

I would appreciate if you can let me know what I’m doing wrong here…? or parameters I need to adjust etc…,

Hi All,

Can I please get a respond on this issue I’m having ??

Besides simulation on gazebo with Magni, I tried in real life today and done map_runner first in Magni_lidar and then roslaunch magni_nav move_base.launch (with nothing modified)…

And I keep getting these errors below ? please advice me on how to resolve this frustration…I couldnt use it at all…,



Hi @All,

I had made some progress since my last post here with move base,

it seems to be working now on navigating from point A to B, but it seems that it did not take the “Sonars” into account for sudden appearing obstacles, it will just run straight into it, but with move_basic, it detects obstacles with the sonars and stops, what do I need to add to the move base params.yaml or move_base.launch in order to activate the sonar detections (same as move_basic)?

or atleast tell me which file should I be looking at to add sonar detections? (am lost at the moment…)

by the way, I can see the sonars active in RVIZ and rostopic echo /sonars (returned datas), but not stopping when there are obstacles in front …(eg…a person standing in the way), during navigation from A to B.

Thanks

any replies please???

Yeah move_base isn’t really designed to work with sonars, in fact it doesn’t work at all without a map, for which you’d need a lidar anyway. And if you’ve got a lidar for mapping, then it makes sense to use it for collision avoidance too, since it’s far more reliable.

I think the issue here may instead be that the local planner is not avoiding obstacles properly in general. Possibly due to a misconfig of the robot shape or something similar. I think DWA doesn’t work very well with the magni by default, but TEB performs a bit better.

@emptyslacker might know more.

@MoffKalast …I dont get it…what works with Sonars then? only move basic?

yes I use a lidar but it does not do any collision avoidance (it avoids the walls and that) but not me infront of it, it will just crash into me,

TEB planner is not even installed by default in magni, I had to install it myself and after testing with TEB, it’s like its on steroids…, it goes really fast from A to B and rotate recovery keeps failing (may be because Magni is not round?) but in terms of accuracy, I think it’s better than DWA…but still sudden obstacle avoidance did not work…, please advise? thanks, awaiting your reply,

Yes, in their raw form at least. It is also possible to convert the sonar data into a laserscan or pointcloud, which can then be used by navigation. Or something like the range_sensor_layer which integrates them into the costmap of move_base.

Are you sure the configuration is correct on that? TEB has I think something like 3 or 4 config files that need to be adjusted to fit the robot. One of them should have a definition for the robot shape and size, which is likely too small given that it’s not stopping soon enough.

@MoffKalast ,

ok, in that case, I had integrated something like that in the costmap of move base, below:
are you referring to the obstacle layer? (I have included the laser scan and sonar scan sensor),

topic is /sonars , is that not right?

obstacle_layer:
enabled: true
max_obstacle_height: 0.6
min_obstacle_height: 0.0
origin_z: 0.0
z_resolution: 0.2
z_voxels: 10
unknown_threshold: 15
mark_threshold: 0
combination_method: 1
track_unknown_space: true
obstacle_range: 5.5
raytrace_range: 6.0
inflation_radius: 0.10
observation_sources: laser_scan_sensor sonar_scan_sensor
publish_voxel_map: true

sonar_scan_sensor:
data_type: PointCloud2
topic: /sonars
marking: true
clearing: true
min_obstacle_height: 0.0
max_obstacle_height: 0.3
observation_persistence: 0.0

or are you referring to the local and global costmap which I need to add a layer in the plugins (at the bottom)?

plugins:

  • {name: static_layer, type: “costmap_2d::StaticLayer”}
  • {name: obstacle_layer, type: “costmap_2d::VoxelLayer”}
  • {name: inflation_layer, type: “costmap_2d::InflationLayer”}
  • {name: sonar, type: “range_sensor_layer::RangeSensorLayer”}

I did and I got this error when loading:

any response on this please?

Sorry, I don’t know Move base well enough to comment. It is a very involved nav stack and requires a lot of messing around to get it’s great many parameters sorted out, that I know.

well, I have worked out without the need of sonars, just using the laser to avoid sudden appearing objects.