When I try to "ros2 topic list" or "ros2 bag play - ", while making warnings into errors:
I get this error: /opt/ros/foxy/bin/ros2:6: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
However, it works normally after receiving the error message. Can I ignore this error message?
Yes, You can ignore the Deprecation Warning using python warnings module.
Steps 1 - Create class as a decorator
Step 2 - Use the decorator
By doing this you can ignore the pkg_resources deprecation warning.