iris-ua / iris_lama_ros

LaMa on ROS
BSD 3-Clause "New" or "Revised" License
208 stars 59 forks source link

Message Filter Dropping all the messages #45

Closed zainmehdi closed 3 years ago

zainmehdi commented 3 years ago

Hi I am trying to run Iris LAMA with YD Lidar X2L on a rapsberry pi. When I run online slam node I always get this message.

MessageFilter [target=odom ]: Dropped 100.00% of messages so far. Please turn the [ros.iris_lama_ros.message_filter] rosconsole logger to DEBUG for more information.

[DEBUG] [1629858705.451106768]: MessageFilter [target=odom ]: Removed oldest message because buffer is full, count now 100 (frame_id=laser_frame, stamp=1629858694.077876)
[DEBUG] [1629858705.451174537]: MessageFilter [target=odom ]: Added message in frame laser_frame at time 1629858705.340, count now 100

Can there be any hints on whats wrong here ?

Thanks

eupedrosa commented 3 years ago

Hi @zainmehdi.

That usually happens when the transformation frames are not correct. Please make sure you have the base_frame_id and odom_frame_id properly set, and also the scan_topic set to the correct laser topic.

By the way, which ROS version are you using?

zainmehdi commented 3 years ago

hi @eupedrosa thanks for the reply. I am using ROS Noetic and Ubuntu Mate,

eupedrosa commented 3 years ago

Remember to not use / in the name of the frames, for example: base_frame_id=base_link not base_frame_id=/base_link

zainmehdi commented 3 years ago

Thanks alot. I will try and share my results.

zainmehdi commented 3 years ago

I tried following command rosrun iris_lama_ros slam2d_ros scan_topic:=scan base_frame_id:=base_footprint odom_frame_id:=odom

YDLidar is publishing a static transform from base_footprint to laser_frame but still I get the same error. Is there anything wrong in the transforms ?

eupedrosa commented 3 years ago

For the scan_topic try scan_topic:=/scan

zainmehdi commented 3 years ago

Same result :(

eupedrosa commented 3 years ago

Can you provide a small bag so I can try understand what it is happening?

zainmehdi commented 3 years ago

Here is the bag file. https://drive.google.com/file/d/1udN77bSRptg_qSVWx9SdR7Fq7WeItFIV/view?usp=sharing Thanks

eupedrosa commented 3 years ago

@zainmehdi, you bag is missing the /tf_static

Bu can you try with the following command:

rosrun iris_lama_ros slam2d_ros _scan_topic:=/scan _base_frame_id:=base_footprint _odom_frame_id:=odom

The parameters need the _ prefix before their name otherwise they are interpreted as topic and not parameter.

zainmehdi commented 3 years ago

@eupedrosa Thanks alot for your help but it still gives me the same error. The slam node isnt publishing any transform from map->odom. I am sure there is something wrong with the node publishing laser messages

eupedrosa commented 3 years ago

Also check you TF tree to make sure everything is OK.

zainmehdi commented 3 years ago

It worked just after a restart. I am not sure what was wrong but I didnt change much.

rosrun iris_lama_ros slam2d_ros _scan_topic:=/scan _global_frame_id:=map _base_frame_id:=base_footprint _odom_frame_id:=base_footprint

Since I dont have any odometry source the output from map->odom is always zero. Is odometry source mandatory for lama ? Here is my Tf

frames

eupedrosa commented 3 years ago

It is better to have odometry, but since you do not have odometry try the following:

rosrun iris_lama_ros slam2d_ros _scan_topic:=/scan _global_frame_id:=map _base_frame_id:=base_footprint _odom_frame_id:=base_footprint _d_thresh:=-1.0 _a_thresh:=-1.0

This will replace the odometry by aplying the scan matching every time there is a scan.

zainmehdi commented 3 years ago

Thanks alot @eupedrosa That did the trick. Working like a charm now. If possible it would be really helpful to add this odometry tip in the readme for noobs like me :)

eupedrosa commented 3 years ago

It is a hidden feature :smile:

But yes, I should add it to the README.