Why is my AMCL node closing when I try to set the use_map_topic parameter?
PROBLEM: I can't get my AMCL node to keep running when I subscribe it to my /map
topic by setting the use_map_topic
parameter to true
.
I first start publishing my map.yaml
information using the below command:
rosrun map_server map_server map.yaml`
I then use rostopic list
to verify that the topics /map
and /map_metadata
are publishing, which they are. I next start my amcl node using the below command:
rosrun amcl amcl
The amcl
node starts up, as expected, and prints the below information. I also verify that the amcl
node is open and running using rosnode list
and it shows that /amcl
is running.
[ WARN] [1606378586.662116874]: ignoring NAN in initial pose Yaw
[ INFO] [1606378586.689947081]: Requesting the map...
[ INFO] [1606378586.692868130]: Received a 384 X 384 map @ 0.050 m/pix
[ WARN] [1606378586.701443890]: ignoring NAN in initial pose Yaw
[ INFO] [1606378586.711590685]: Initializing likelihood field model; this can take some time on large maps...
[ INFO] [1606378586.724505768]: Done initializing likelihood field model.
[ WARN] [1606378601.810399414]: No laser scan received (and thus no pose updates have been published) for
1606378601.810285 seconds. Verify that data is being published on the /scan topic.
However, the node isn't subscribing to my /maps
topic. According to the amcl ros wiki, I need to set my use_map_topic
to true
, and it will start subscribing. So I close my amcl
node and reopen it using the below command:
rosrun amcl amcl --ros-args -p use_map_topic:=true
This command gives me the below printout in the command window. With no explanation, the node just closes. I am new to using amcl
, so is there something I am missing? Shouldn't the node stay open and just keep looking for the /scan
topic like it did when I just used the rosrun amcl amcl
command?
[ WARN] [1606378851.880883739]: ignoring NAN in initial pose Yaw
[ INFO] [1606378851.902627961]: Requesting the map...
[ INFO] [1606378851.905172130]: Received a 384 X 384 map @ 0.050 m/pix
[ WARN] [1606378851.914856931]: ignoring NAN in initial pose Yaw
[ INFO] [1606378851.925499145]: Initializing likelihood field model; this can take some time on large maps...
[ INFO] [1606378851.937561677]: Done initializing likelihood field model.
00:20~/wanderbot_ws$
Linux 5.3.0-62-generic #56 18.04.1-Ubuntu
this seems like you are confusing ROS 2 with ROS 1.
rosrun
is from ROS 1. It does not accept--ros-args
.