I built this project by "catkin build" and tried samples.
But I found following error in "roslaunch rexrov2_gazebo start_demo_pid_controller.launch"
on the page of Path and trajectory generators.
The purple line was not shown and UUV couldn't be controlled.
Traceback (most recent call last):
File "/home/xavier/catkin_ws_python3/src/uuv_simulator/uuv_control/uuv_trajectory_control/scripts/rov_pid_controller.py", line 16, in <module>
import rospy
File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/__init__.py", line 49, in <module>
from .client import spin, myargv, init_node, \
File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/client.py", line 52, in <module>
import roslib
File "/opt/ros/melodic/lib/python2.7/dist-packages/roslib/__init__.py", line 50, in <module>
from roslib.launcher import load_manifest
File "/opt/ros/melodic/lib/python2.7/dist-packages/roslib/launcher.py", line 42, in <module>
import rospkg
ModuleNotFoundError: No module named 'rospkg'
[rexrov2/rov_pid_controller-12] process has died [pid 20151, exit code 1, cmd /home/xavier/catkin_ws_python3/src/uuv_simulator/uuv_control/uuv_trajectory_control/scripts/rov_pid_controller.py odom:=pose_gt trajectory:=dp_controller/trajectory input_trajectory:=dp_controller/input_trajectory waypoints:=dp_controller/waypoints error:=dp_controller/error reference:=dp_controller/reference thruster_output:=thruster_manager/input_stamped __name:=rov_pid_controller __log:=/home/xavier/.ros/log/0a62de3c-a14b-11e9-84ea-00044bcbaeb2/rexrov2-rov_pid_controller-12.log].
log file: /home/xavier/.ros/log/0a62de3c-a14b-11e9-84ea-00044bcbaeb2/rexrov2-rov_pid_controller-12*.log
I thought the cause is that rov_pid_controller.py's shebang specify Python3. Then I modified following.
I look like this scripts works for Python2.7 without problems.
This shebang was modified at commit: 79fa8bbb5f9ba37930e6ac4983d5c8035d22191d 8days ago.
The commits modified some python scripts' header. However, the shegang's change is toward only rov_pid_controller.py.
This scripts occurs serious problems without using Python3?
If so, I must look for other arrpoach. Would you have some ideas?
I built this project by "catkin build" and tried samples. But I found following error in "roslaunch rexrov2_gazebo start_demo_pid_controller.launch" on the page of Path and trajectory generators. The purple line was not shown and UUV couldn't be controlled.
I thought the cause is that rov_pid_controller.py's shebang specify Python3. Then I modified following.
I look like this scripts works for Python2.7 without problems.
This shebang was modified at commit: 79fa8bbb5f9ba37930e6ac4983d5c8035d22191d 8days ago. The commits modified some python scripts' header. However, the shegang's change is toward only rov_pid_controller.py.
This scripts occurs serious problems without using Python3? If so, I must look for other arrpoach. Would you have some ideas?
Thanks for reading.