I’m trying to link a Raspberry pi with pycroft with a Turtlebot via SSH. I have created a skill and I want that when I said “go to somewhere” the turtlebot goes to this place.
No problem with this part. The problem come here.
I have a python script and it works fine if firstly I connect via ssh and then I execute python go_to_specific_point_on_map.py
$ ssh tb2@192.168.0.158
$ python go_to_specific_point_on_map.py
Image of everything working fine
But if I tried to do all in one command, I get: ImportError: No module named ‘rospy’
$ ssh tb2@192.168.0.158 python go_to_specific_point_on_map.py
Image of the error. ImportError: No module named rospy
^[Traceback (most recent call last):
File "./mubita/go_to_specific_point_on_map.py", line 22, in <module>
import rospy
ImportError: No module named rospy
I have tried the arunp9294’s solution but I get the same error. $ ssh tb2@192.168.0.158 “source ~/.bashrc; python go_to_specific_point_on_map.py”
The file go_to_specific_point_on_map.py is here: go to specific point on map script
I think it is a problem due to .bashrc is not loaded and the alias neither. I don’t know exactily what the problem is and how to solve it.
Can somebody help me? please.
I don’t know how to get it to work.
Thank you very much and best regards