写在前面:
之前的nx平台也是使用ros功能报的时候出现了没有rospy的问题,我的解决方法非常的取巧,主要是利用了pycharm中的一个添加寻找包路径的功能,在当前环境中找不到就会在指定的路径里去寻找,你还别说真TM跑起来了(哈哈哈)但是在orin平台的时候你不能总是靠装个pycharm才能跑吧!!!
那么怎么才能使用最简单的方法搞定呢,答案很简单
在acp_front.py的最开头添加以下代码即可解决!!!!!
import sys
galactic_path='/opt/ros/galactic/lib/python3.8/site-packages'
noetic_path = '/opt/ros/noetic/lib/python3/dist-packages'
if galactic_path in sys.path:
sys.path.remove(galactic_path)
if noetic_path not in sys.path:
sys.path.append(noetic_path)