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

Error in rviz2 while sending navigation 2d goal in ros2 #521

Closed
pankhurivanjani opened this issue Mar 20, 2020 · 11 comments
Closed

Error in rviz2 while sending navigation 2d goal in ros2 #521

pankhurivanjani opened this issue Mar 20, 2020 · 11 comments

Comments

@pankhurivanjani
Copy link

Hello!

I am working on navigation2 using ros2 dashing. While sending nav2 goal, robot isn't responding. Checking the logs lead me to this rviz2 error

[rviz2-3] [ERROR] [rviz2]: Lookup would require extrapolation into the future.  Requested time 325.41500 but the latest data is at time 325.38000, when looking up transform from frame [base_scan] to frame [map]
[rviz2-3] [ERROR] [rviz2]: Lookup would require extrapolation into the future.  Requested time 325.61500 but the latest data is at time 325.58400, when looking up transform from frame [base_scan] to frame [map]
[rviz2-3] [ERROR] [rviz2]: Lookup would require extrapolation into the future.  Requested time 325.81500 but the latest data is at time 325.78800, when looking up transform from frame [base_scan] to frame [map]
[rviz2-3] [ERROR] [rviz2]: Lookup would require extrapolation into the future.  Requested time 326.01500 but the latest data is at time 325.99200, when looking up transform from frame [base_scan] to frame [map]

I tried looking into similar issues with ros1 in other threads, some of which suggested changing queue size in laserscan, I tried that too but it didn't help.

I have done few changes from regular configuration:

  1. Enabled static layer in global costmap

Does it affect the navigation goal sending?

Any suggestion in this matter would be helpful.

Thanks and Regards,
Pankhuri

@Martin-Idel
Copy link
Contributor

This might be fixed via #519, since until then RViz clock and the clocks used for publishing the navigation goal are not the same, so something might go wrong there - if you could check with master that would be great.

@claireyywang
Copy link

@pankhurivanjani seems like #519 is merged. Mind checking to see if the error is fixed?

@pankhurivanjani
Copy link
Author

Sure, I will check it and provide you with the review.

@claireyywang
Copy link

Sure, I will check it and provide you with the review.

thanks!

@pankhurivanjani
Copy link
Author

Hello @claireyywang !
I checked it multiple times but error still persists. I did update the ros2 Dashing navigation before running it.

@claireyywang
Copy link

Hello @claireyywang !
I checked it multiple times but error still persists. I did update the ros2 Dashing navigation before running it.

By "ros2 dashing" do you mean the ros2 or dashing branch? The fix is merged into ros2 (with default tag).

@pankhurivanjani
Copy link
Author

I have updated ros2. Not going into specific branch, for more information I wanted to convey I am using dashing.

@claireyywang
Copy link

To get the latest #519 fix, you need to update your current rviz folder with ros2 branch upstream. If you are using source installation, you can use the following commands

cd [YOUR ROS2 WORKSPACE]/src/ros2/rviz
git checkout ros2
cd [YOUR ROS2 WORKSPACE]
colcon build -packages-up-to rviz

You might have to update packages rviz depends on, since dashing is almost two releases older than the latest branch.

@pankhurivanjani
Copy link
Author

Hi @claireyywang
I had binary release and updating it didn't help so I tried updating the source package. While building I got the error in

pankhuri@pankhuri-LENOVO-IDEAPAD-500-15ISK:~/ros2_ws$ sudo colcon build
Starting >>> ament_package
Starting >>> ament_lint
Starting >>> fastcdr
Starting >>> foonathan_memory_vendor
Finished <<< foonathan_memory_vendor [1.82s]                  
Starting >>> poco_vendor                                      
Finished <<< fastcdr [1.87s]
Starting >>> fastrtps
Finished <<< poco_vendor [0.35s]                              
Starting >>> cyclonedds
Finished <<< ament_package [2.65s]                            
Starting >>> ament_cmake_core
Finished <<< fastrtps [1.16s]                              
Starting >>> ament_cppcheck
Finished <<< ament_lint [3.09s]
Finished <<< cyclonedds [0.93s]
Starting >>> ament_flake8
Starting >>> tinydir_vendor                                            
Finished <<< ament_cmake_core [2.12s]                                    
Starting >>> ament_cmake_libraries
Finished <<< tinydir_vendor [1.74s]                            
Starting >>> ament_cmake_export_libraries
Finished <<< ament_cppcheck [2.69s]                            
Starting >>> ament_cmake_include_directories
Finished <<< ament_cmake_libraries [1.15s]                    
Starting >>> ament_cmake_python
Finished <<< ament_cmake_export_libraries [1.14s]
Starting >>> ament_cmake_export_dependencies
Finished <<< ament_flake8 [3.02s]                             
Starting >>> ament_cmake_export_definitions
Finished <<< ament_cmake_include_directories [1.04s]
Starting >>> ament_cmake_export_include_directories
Finished <<< ament_cmake_export_dependencies [1.05s]                         
Starting >>> ament_cmake_export_link_flags
Finished <<< ament_cmake_python [1.16s]                                      
Starting >>> ament_cmake_test
Finished <<< ament_cmake_export_definitions [1.04s]
Starting >>> ament_cmake_version
Finished <<< ament_cmake_export_include_directories [0.97s]
Starting >>> ament_cmake_export_interfaces
Finished <<< ament_cmake_export_link_flags [1.05s]
Starting >>> ament_cmake_target_dependencies
Finished <<< ament_cmake_version [1.14s]                                   
Starting >>> ament_pep257
Finished <<< ament_cmake_test [1.63s]                                      
Starting >>> ament_lint_auto
Finished <<< ament_cmake_export_interfaces [1.59s]
Starting >>> gtest_vendor
Finished <<< ament_cmake_target_dependencies [1.30s]
Starting >>> ament_cmake
Finished <<< gtest_vendor [0.35s]                              
Starting >>> ament_cmake_gtest
Finished <<< ament_lint_auto [1.41s]                           
Starting >>> ament_cmake_pytest
Finished <<< ament_cmake [1.10s]                               
Starting >>> uncrustify_vendor
Finished <<< ament_cmake_gtest [1.05s]                         
Starting >>> libyaml_vendor
Finished <<< ament_pep257 [2.51s]                              
Starting >>> ament_copyright
Finished <<< ament_cmake_pytest [1.87s]                                      
Starting >>> ament_index_python
Finished <<< uncrustify_vendor [1.61s]   
Starting >>> ament_uncrustify
Finished <<< libyaml_vendor [2.17s]                                           
Starting >>> osrf_pycommon
Finished <<< ament_copyright [2.98s]                              
Starting >>> ament_lint_cmake                                        
Finished <<< ament_index_python [3.64s]                              
Starting >>> ament_xmllint
Finished <<< ament_uncrustify [4.13s]                              
Starting >>> ament_cpplint
Finished <<< osrf_pycommon [4.25s]                              
Starting >>> launch                                                
Finished <<< ament_lint_cmake [3.91s]                              
Starting >>> ament_cmake_lint_cmake                             
Finished <<< ament_xmllint [2.53s]
Starting >>> console_bridge_vendor
Finished <<< ament_cpplint [3.26s]                              
Starting >>> gmock_vendor                                
Finished <<< ament_cmake_lint_cmake [1.56s]              
Starting >>> ament_cmake_copyright
Finished <<< gmock_vendor [0.40s]                        
Starting >>> domain_coordinator                          
Finished <<< console_bridge_vendor [1.73s]
Starting >>> ament_cmake_gmock
Finished <<< launch [3.72s]                              
Starting >>> launch_testing                                                   
Finished <<< ament_cmake_copyright [2.07s]                                    
Starting >>> ament_cmake_cppcheck
Finished <<< ament_cmake_gmock [2.10s]                               
Starting >>> ament_cmake_cpplint
Finished <<< domain_coordinator [2.63s]                              
Starting >>> ament_cmake_uncrustify
Finished <<< ament_cmake_cppcheck [1.13s]                        
Starting >>> ament_cmake_flake8
Finished <<< ament_cmake_cpplint [1.14s]                         
Starting >>> ament_cmake_pep257
Finished <<< launch_testing [2.63s]                              
Starting >>> ament_cmake_xmllint
Finished <<< ament_cmake_uncrustify [1.12s]
Starting >>> tinyxml2_vendor
Finished <<< tinyxml2_vendor [0.34s]                                         
Starting >>> orocos_kdl
Finished <<< ament_cmake_flake8 [1.11s]                                      
Starting >>> yaml_cpp_vendor
Finished <<< ament_cmake_pep257 [1.17s]                                      
Starting >>> eigen3_cmake_module
Finished <<< ament_cmake_xmllint [1.07s]                                      
Starting >>> ament_lint_common
Finished <<< orocos_kdl [0.72s]                                           
Starting >>> tinyxml_vendor
Finished <<< tinyxml_vendor [0.40s]                                     
Starting >>> urdfdom_headers
Finished <<< yaml_cpp_vendor [1.34s]                                           
Starting >>> osrf_testing_tools_cpp                                           
Finished <<< eigen3_cmake_module [1.09s]
Finished <<< urdfdom_headers [0.36s]
Starting >>> urdfdom
Starting >>> libcurl_vendor
Finished <<< ament_lint_common [1.36s]                                      
Starting >>> rosidl_adapter
Finished <<< urdfdom [1.08s]             
Starting >>> rosidl_typesupport_interface
Finished <<< osrf_testing_tools_cpp [1.21s]
Starting >>> fastrtps_cmake_module
Finished <<< libcurl_vendor [1.27s]                                      
Starting >>> connext_cmake_module
Finished <<< rosidl_typesupport_interface [1.23s]                      
Starting >>> opensplice_cmake_module
Finished <<< fastrtps_cmake_module [1.20s]                             
Starting >>> cyclonedds_cmake_module
Finished <<< connext_cmake_module [1.28s]                              
Starting >>> rmw_implementation_cmake
Finished <<< rosidl_adapter [2.42s]                                      
Starting >>> rosidl_parser
Finished <<< opensplice_cmake_module [1.19s]
Starting >>> python_cmake_module
Finished <<< cyclonedds_cmake_module [1.23s]
Starting >>> ament_index_cpp
Finished <<< rmw_implementation_cmake [1.26s]
Starting >>> ament_cmake_ros
Finished <<< python_cmake_module [1.33s]                              
Starting >>> class_loader
Finished <<< ament_cmake_ros [1.29s]                                  
Starting >>> tracetools
Finished <<< ament_index_cpp [1.63s]                                    
Starting >>> launch_testing_ament_cmake
Finished <<< rosidl_parser [2.46s]                                      
Starting >>> rosidl_cmake
Finished <<< launch_testing_ament_cmake [1.25s]                           
Starting >>> rcutils                                                   
Finished <<< rosidl_cmake [1.37s]                                          
Starting >>> rosidl_generator_dds_idl
Finished <<< class_loader [2.61s]                                           
Finished <<< tracetools [2.42s]                                           
Starting >>> python_qt_binding
Starting >>> urdf
Finished <<< rosidl_generator_dds_idl [3.09s]                   
Starting >>> ament_cmake_auto
Finished <<< urdf [3.15s]                                            
Starting >>> rviz_assimp_vendor
Finished <<< python_qt_binding [3.23s]
Starting >>> qt_gui
Finished <<< ament_cmake_auto [1.19s]                                
Starting >>> rviz_ogre_vendor
Finished <<< rviz_assimp_vendor [1.28s]                                
Starting >>> qt_gui_py_common
Finished <<< rcutils [5.62s]
Starting >>> rcpputils                                           
Finished <<< qt_gui [1.44s]                                      
Starting >>> rcl_logging_log4cxx
--- stderr: rviz_ogre_vendor                                                 
make[2]: *** [ogre-v1.12.1-prefix/src/ogre-v1.12.1-stamp/ogre-v1.12.1-patch] Error 1
make[1]: *** [CMakeFiles/ogre-v1.12.1.dir/all] Error 2
make: *** [all] Error 2
---
Failed   <<< rviz_ogre_vendor	[ Exited with code 2 ]
Aborted  <<< qt_gui_py_common
Aborted  <<< rcl_logging_log4cxx                                             
Aborted  <<< rcpputils                                       

Summary: 84 packages finished [41.7s]
  1 package failed: rviz_ogre_vendor
  3 packages aborted: qt_gui_py_common rcl_logging_log4cxx rcpputils
  1 package had stderr output: rviz_ogre_vendor
  207 packages not processed

I could not find any existing issue for this problem. Could you suggest something?

@hidmic
Copy link
Contributor

hidmic commented Apr 8, 2020

@pankhurivanjani I'd suggest you don't build using sudo -- that'll switch your environment for (apparently) no good reason.


About the issues you're seeing. The error logs you're seeing do not seem related to clock mismatch issues. At best, it's just tf messages latency. So this isn't an rviz issue.

I'll assume you're using rviz default send goal tool. Then,

  • Check the topic that tool is configured to publish to and update it if necessary.
  • ros2 topic echo what you publish and make sure the goal message makes sense (coordinates, frames, timestamp).
  • Check navigation2 nodes' logs to see if they're getting any message at all.

If everything else fails, do know that navigation2 offers its own goal tool for rviz that you may leverage.

@hidmic
Copy link
Contributor

hidmic commented Apr 8, 2020

One last thing. This kind of questions are more appropriate for answers.ros.org, where the entire community can chime in and provide some guidance on how to proceed. There, all exchanges remain visible for others to learn from them, as opposed to left forgotten in an eventually closed issue.

So I'll close this now, and encourage you to continue with the discussion over there.

@hidmic hidmic closed this as completed Apr 8, 2020
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

4 participants