Closed HazemAbidi closed 3 years ago
Have you checked rqt_graph, to check whether laser_scan_matcher subscribed to correct topic of laser scan?
Yes I did that it appears that the laser_scan_matcher subscribes to the /scan topic but it didn't subscribe to the /tf topic. Also, it publishes /tf and /odom topics. And there is no odom frame in the tf tree.
I don't understand, node is publishing /tf and /odom topics or not?
Also, it publishes /tf and /odom topics.
I have checked now, it should publish both, if parameters are set correctly.
Can you please check following things:
1) Parameters are actually set. Better to do that with ros2 param get ...
2) Node is actually launched and running
Also, it would be helpful if you post console output here when you launch the node.
Hello,
Alright this is my rqt graph :
So these are the params that I've changed:
add_parameter("publish_odom", rclcpp::ParameterValue(std::string("odom")), "If publish odometry from laser_scan. Empty if not, otherwise name of the topic"); add_parameter("publish_tf", rclcpp::ParameterValue(true), " If publish tf odom->base_link");
And finally the console:
for the params :
Thank you for the output, all looks fine for me. Due to the fact, that when you echo topic it says nothing, it maybe unmatched QoS settings. If the topic is not published it should say WARNING: topic [/odom] does not appear to be published yet
.
Can you double check in rviz, that odom is not published?
Thank you for your quick response. I checked Rviz as I said I haven't found an odometry frame. I changed the durability and reliability policies of the Odom topic and nothing happened. (tried transient local durability and best-effort reliability) Isn't meant that laser scan matcher node to subscribe to /tf topic? Because it doesn't appear that it is subscribing to it in the rqt_graph. Correct me if I'm wrong please.
Do you have any MWE? I've run all the latest files in simulation today and all worked fine.
Also, you can double check that data arrives to the /scan topic. If you are using not the latest gazebo_ros_pkgs , it does use QoS by default, that will be unmatched by laser scanner (see this PR)
If there is no data on the /scan topic, please update gazebo_ros_pkgs to latest version, it should fix all the issues. Otherwise, you can send your package here and I will see what's the issue, because on my machine all is working.
Hey again, I checked the QoS of both publisher and subscriber of /scan topic. As you can see the QoS is not compatible, gazebo_head_hoyoku is giving a best effort reliability however laser_scan_matcher wats a reliable reliability This is the version of gazebo ros pkgs that I have and it says that it is the latest version
I suggest you to build them from source, that way you guaranteed to get the latest version, but this issue is out of scope of this project, so I will close it
Hello, I'm working on a project in Ros2 foxy and I want to use the laser scan matcher to get the odometry from it. I changed publish_odom param to "odom" and publish_tf to true and I still don't have an output when I run
ros2 topic echo /odom
. Also the tf tree has no odom frame on it. My diff drive plugin is the following: `