hmz-15 / Interactive-Scene-Reconstruction

Reconstructing Interactive 3D Scenes for Simulating Robot Autonomy
BSD 3-Clause "New" or "Revised" License
126 stars 17 forks source link

Empty visualization in rviz #1

Closed quanvuong closed 2 years ago

quanvuong commented 2 years ago

Hi,

Thank you for the repo!

I tried the visualization instruction in interactive scene but encountered an empty visualization window in rviz. Please see my screenshot for an illustration of the empty visualization window. Have you encountered this issue before and do you by any chance know how to fix it?

I used the reconstructed panoptic segments and estimated contact graph from the provided Google Drive link.

Screenshot from 2021-11-23 15-07-29 Thank you!

hmz-15 commented 2 years ago

Hi, thanks for your interests about our work! You need to generate Xacro following 2.1 before visualizing the scene in Rviz. Did you go through this step?

quanvuong commented 2 years ago

Hi!

Yes, I used the command in 2.1 to generate the Xacro file before running the visualization. Were you able to reproduce the issue by any chance?

hmz-15 commented 2 years ago

Can you please show me the output of your xacro commands? Do you see "[OK] Done! sceneNN_test is saved at..." which indicates the success?

quanvuong commented 2 years ago

xacro_command_output.txt

Yes, I saw the "[OK] Done!" message. Please find the complete output log in the file attached.

Please note that I change the scene name, but I made sure the changed name is consistent between the name of the folder inside output, the scene name passed to the generate xacro command and the scene name passed to the visualization command.

hmz-15 commented 2 years ago

Thanks Quan. I think it may due to a typo in your command. It should be ":=" instead of ":==".

quanvuong commented 2 years ago

Can you please take another look? I had that typo in the image in my original post, but that returned an error and I fixed the typo in the second command (also in the same image) that was able to run and produce the empty visualization.

TooSchoolForCool commented 2 years ago

What is your system version? We need more information to debug you issue.

It seems the URDF file was parsed correctly, but TF information was not published as expected.

Could you please send us a copy of your generated xacro files? (The whole folder under /scene_builder/output/).

quanvuong commented 2 years ago

Please find the compressed file of output in the link below. Please note that I am using the scene name sceneNN_test_from_google_drive to run the visualization using the data provided by the Google link in 1.2

Please find system info below:

Output of uname -a: Linux telemaniu20 5.8.0-53-generic #60~20.04.1-Ubuntu SMP Thu May 6 09:52:46 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

The output of running dpkg -l | grep ros- > ros_packages_info.txt is attached. ros_packages_info.txt

quanvuong commented 2 years ago

For the compressed output directory: https://drive.google.com/file/d/1dJi8Ulh9q6rPwAQIMHKqabG2mQ70wMtB/view?usp=sharing

quanvuong commented 2 years ago

btw, what is the ROS topics that the TF information is being published from? I can check it on my side. Thanks!

TooSchoolForCool commented 2 years ago

Please note that you cannot directly manually change the scene name (e.g., change the folder name in the scene_builder/output), as the xacro will use the original scene name to find dependent mesh files, xacro files.

If you want to change the scene name, you should set the roslaunch file parameters while generating the scene.

I browsed your xacro_command_output.txt, it seems you did not change the folder name by hand. The way you change the scene name is correct.

TooSchoolForCool commented 2 years ago

I tried your generated xacro scene sceneNN_test_from_google_drive. It works as expected on my side.

scene_builder_rviz

You can use command

rosrun rqt_graph rqt_graph

to check if ros node are launched as expected.

Here is an expected output

scene_builder_rqt_graph

To check the TF information, you can use command

rosrun rqt_tf_tree rqt_tf_tree

and here is an example of expected output

scene_builder_tf_tree

quanvuong commented 2 years ago

Yes, for some reason the tf information is not being published. I include the output of rosrun rqt_graph rqt_graph and rosrun rqt_tf_tree rqt_tf_tree in the image below.

Do you have any tips to debug this on my end?

Screenshot from 2021-11-23 18-10-00

TooSchoolForCool commented 2 years ago

Did you have robot_state_publisher and joint_state_publisher installed properly?

It seems your ROS environment misses some core modules.

quanvuong commented 2 years ago

What is your ros version? Checking the file ros_packages_info.txt, I can see that I had installed ros-noetic-joint-state-publisher and ros-noetic-robot-state-publisher, but the error still occurs.

TooSchoolForCool commented 2 years ago

Yes, for some reason the tf information is not being published. I include the output of rosrun rqt_graph rqt_graph and rosrun rqt_tf_tree rqt_tf_tree in the image below.

Do you have any tips to debug this on my end?

Screenshot from 2021-11-23 18-10-00

Another possible problem is that you did not close previously launched nodes. In your rqt_graph screenshot, it seems the robot_state_publisher and joint_state_publisher are still running. You need to kill those running processes at backend.

quanvuong commented 2 years ago

I tried killing all ros nodes but still that doesn't fix the issue (please see attached image). Is there anyway I can run the visualization code in verbose mode to debug the issue? Screenshot from 2021-11-23 18-50-22

hmz-15 commented 2 years ago

BTW, @quanvuong is there any chance that you run the gazebo command and get some error at some points? I remembered that I came across one similar case when I run gazebo failed, and then I just couldn't visualize the scene in rviz.

TooSchoolForCool commented 2 years ago

You can use rostopic to check if TF messages were published correctly.

BTW, I would recommend you to go through the ROS URDF tutorial to check if those fundamental ROS modules work as expected.

quanvuong commented 2 years ago

I was able to fix the issue and visualize the scene in gazebo and rviz. Thank you for your quick reply and help!