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

无法显示点云 #23

Open
2805651606 opened this issue Jul 7, 2024 · 5 comments
Open

无法显示点云 #23

2805651606 opened this issue Jul 7, 2024 · 5 comments

Comments

@2805651606
Copy link

image
image
都运行成功,也没有任何报错。但是就是无法显示点云

@tipodgorsk
Copy link

Hi @2805651606, it seems that you are trying to display data coming from the topic "octomap_point_cloud_centers" (aka sensor_msgs::msg::PointCloud2), as an occupancy grid. I don't think it's possible.

  1. Make sure that you are filling a topic with "sensor_msgs::msg::PointCloud2". Let's call this topic "/your_topic"
    Use "ros2 topic echo /your_topic" to check it.

  2. launch the octomap_server2 node with "ros2 launch octomap_server2 octomap_server_launch.py input_cloud_topic:=/your_topic". You can find all parameters which can be remapped in "launch/octomap_server_launch.py".

  3. You can display the occupancy grid in rviz2 by clicking on "Display --> by_topic --> /projected_map"

If it's still not working, please try to give me as much information as possible

@2805651606
Copy link
Author

image
也是按照老哥你的步骤提示的做的,就是会显示[octomap_server-1] [INFO] [1720579298.740991451] [octomap_server]: Message Filter dropping message: frame 'camera_depth_optical_frame' at time 1720579298.534 for reason 'discarding message because the queue is full' 这么个错误
image 点云数据可以发布

@tipodgorsk
Copy link

Can you tell me what the purpose of the node at the bottom-left is ? I suppose it's a visual slam node. But it has no name.

Regarding on your MessageFilter issue, it seems that you don't have a full tf tree.

A message filter is an object that filter every message consumed by a subscriber, by checking if a transform with appropriate timestamp between the message frame_id and a reference frame_id is available (in this case, the reference frame_id is "map" by default).

So if you don't generate any tf between your pointcloud_msg frame_ids and a world frame, this won't work.
Refer to the following issue :

https://answers.ros.org/question/389383/slam_toolbox-message-filter-dropping-message-for-reason-discarding-message-because-the-queue-is-full/

To understand and generate a tf tree, see :

https://articulatedrobotics.xyz/tutorials/ready-for-ros/tf/

https://docs.ros.org/en/foxy/Tutorials/Intermediate/URDF/Using-URDF-with-Robot-State-Publisher.html

@2805651606
Copy link
Author

你好,我现在已经可以显示点云图了,但是我再利用ros2 run nav2_map_server map_saver_cli -t /project_map -f fishbot_map进行建图的时候,就会报错。把/project_map的/去掉,也是报同样的错误。请问这是怎么回事呢
image
image

@tipodgorsk
Copy link

This problem does not concern the package octomap_server2 anymore. You may close this issue and open a new one on :

https://github.com/ros-navigation/navigation2/issues

https://robotics.stackexchange.com/

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

2 participants