ros python3 tf 配置

import tf 

删除提示异常的文件

$ cd /opt/ros/melodic/lib/python2.7/dist-packages/
$ sudo rm -r tf .tf tf2_ros .tf2_ros tf2_py .tf2_py

新建一个workspace,用来编译geometrygeometry2两个包。

$ mkdir -p test_env_ws/src
$ cd test_env_ws/src 
$ export ROS_PYTHON_VERSION=3
$ sudo gedit /opt/ros/melodic/share/ros_environment/catkin_env_hook/1.ros_python_version.sh
$ catkin_init_workspace
$ git clone https://github.com/ros/geometry
$ git clone https://github.com/ros/geometry2
$ cd ..
$ catkin_make

编译时显示的python版本要是3.x.x

import tf 

成功。

  • 0
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 5
    评论
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值