Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message Filter dropping message #6

Open
samverghese13 opened this issue May 12, 2021 · 10 comments
Open

Message Filter dropping message #6

samverghese13 opened this issue May 12, 2021 · 10 comments

Comments

@samverghese13
Copy link

[INFO] [launch]: All log files can be found below /home/ign/.ros/log/2021-05-12-23-14-46-522622-ign-59739
[INFO] [launch]: Default logging verbosity is set to INFO
/home/ign/ROS2_workspace/gmapping_ws/install/slam_gmapping/share/slam_gmapping/launch/slam_gmapping.launch.py:10: UserWarning: The parameter 'node_executable' is deprecated, use 'executable' instead
launch_ros.actions.Node(
[INFO] [slam_gmapping-1]: process started with pid [59741]
[slam_gmapping-1] [INFO] [1620841489.741434400] [slam_gmapping]: Message Filter dropping message: frame 'laser' at time 1620841488.319 for reason 'Unknown'
[slam_gmapping-1] [INFO] [1620841489.877446678] [slam_gmapping]: Message Filter dropping message: frame 'laser' at time 1620841488.461 for reason 'Unknown'
[slam_gmapping-1] [INFO] [1620841490.021399181] [slam_gmapping]: Message Filter dropping message: frame 'laser' at time 1620841488.605 for reason 'Unknown'

I tried to publish the transform for laser to base link using the below code
Node(
package = "tf2_ros",
executable = "static_transform_publisher",
arguments = ["0", "0", "0", "0", "0", "0", "base_link", "laser"])

But when I try to run
ros2 launch slam_gmapping slam_gmapping.launch.py

I am getting a message drop error.

I would like to know how this could be eliminated. I am running this on ROS2(Foxy)

@shiveshkhaitan
Copy link
Member

I am unable to reproduce the error mentioned. If you can share the whole package (with launch files for static_transform_publisher and other nodes you are running), maybe I can help debug the issue.

@vineet131
Copy link

vineet131 commented Jun 17, 2021

@samverghese13 it's because you need to publish the transform from map -> Odom and Odom -> base_link. I was getting the same error, but just used these static transforms as a trial and it worked.

Edit: I stand corrected. Only Odom -> base_link is needed.

@BATAxjh
Copy link

BATAxjh commented Sep 13, 2022

I also has the same error ,how do you solve

@BATAxjh
Copy link

BATAxjh commented Sep 13, 2022

image
why odom can not link to base_link

@vineet131
Copy link

@BATAxjh dude, I literally wrote exactly that. You need to publish a transform from Odom -> base_link. It's literally what is missing in the image that you posted

@BATAxjh
Copy link

BATAxjh commented Sep 14, 2022

I had sub "odom" topic ,Related ODOM and Base link relationships have been published internally
image

@BATAxjh
Copy link

BATAxjh commented Sep 14, 2022

I has sub like below,maybe can running ok,thank you ! @vineet131
node_tf2= Node(
package = "tf2_ros",
executable = "static_transform_publisher",
output='screen',
arguments = ["0", "0", "0", "0", "0", "0", "odom", "base_link"])

@vineet131
Copy link

vineet131 commented Sep 14, 2022

I has sub like below,maybe can running ok,thank you ! @vineet131
node_tf2= Node(
package = "tf2_ros",
executable = "static_transform_publisher",
output='screen',
arguments = ["0", "0", "0", "0", "0", "0", "odom", "base_link"])

@BATAxjh If your Odom -> base_link is static (i.e. your "odom" frame doesn't change with respect to your "base_link" frame) then this is okay.

Otherwise, in your image, odom_frame_id should be "odom" and quat_tf.header.frame_id should be "base_link" and the code that you wrote in your image will work without needing the static transform.

Good luck.

@BATAxjh
Copy link

BATAxjh commented Sep 14, 2022

I had tf2::convert(odom_quat, quat_tf) in topsize , I don't know your mean, thank you

@MagicalBrain
Copy link

@samverghese13 You need set the another tf (odom->base_link), for example:

# set static tf odom->base_link
ros2 run tf2_ros static_transform_publisher 0 0 0 0 0 0 "odom" "base_link"

# set static tf base_link->laser
ros2 run tf2_ros static_transform_publisher 0 0 0 0 0 0 "base_link" "laser"

If you run the commands, then the rviz still can not receive the map, maybe you run the gmapping with the real robot.
You can try to run slam_gmapping node as follows:

ros2 launch slam_gmapping slam_gmapping.launch.py use_sim_time:=false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants