在python3中使用ros的库(如geometry及下面的tf等)
文章基于python3.6和ros-kinetic 因为代码中需要在python3环境下使用geometry库,所以想办法解决ros的python3支持问题
问题
在python3环境下,直接使用tf会有如下报错(rospy可正常使用):
>>> import tf
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/ros/kinetic/lib/python2.7/dist-packages/tf/__init__.py", line 28, in <module>
from tf2_ros import TransformException as Exception, ConnectivityException, LookupException, ExtrapolationException
File "/opt/ros/kinetic/lib/python2.7/dist-packages/tf2_ros/__init__.py", line 38,