mit-acl / mader

Trajectory Planner in Multi-Agent and Dynamic Environments
BSD 3-Clause "New" or "Revised" License
494 stars 77 forks source link

I started the file"single_agent_simulation.launch", but it did not run properly. #23

Open GSKun1 opened 5 months ago

GSKun1 commented 5 months ago

[SQ01s/perfect_tracker-4] process has died [pid 312, exit code 1, cmd /home/gsk/Dynamic_multi_agents_ws/src/mader/mader/scripts/perfect_controller.py name:=perfect_tracker log:=/home/gsk/.ros/log/6d3751cc-234c-11ef-8c52-70b5e83420b1/SQ01s-perfect_tracker-4.log]. log file: /home/gsk/.ros/log/6d3751cc-234c-11ef-8c52-70b5e83420b1/SQ01s-perfect_tracker-4*.log process[SQ01s/mader-8]: started with pid [325] process[SQ01s/rosconsole_overlay_text-9]: started with pid [327] Traceback (most recent call last): File "/home/gsk/Dynamic_multi_agents_ws/src/mader/mader/scripts/dynamic_corridor.py", line 14, in import roslib File "/opt/ros/melodic/lib/python2.7/dist-packages/roslib/init__.py", line 50, in from roslib.launcher import load_manifest # noqa: F401 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/ros/melodic/lib/python2.7/dist-packages/roslib/launcher.py", line 42, in import rospkg ModuleNotFoundError: No module named 'rospkg' Parameters obtained Parameters obtained, checking them... Parameters checked Changing DroneStatus from TRAVELING to GOAL_REACHED Set parameter Username Academic license - for non-commercial use only - expires 2025-06-05 [dynamic_corridor-7] process has died [pid 321, exit code 1, cmd /home/gsk/Dynamic_multi_agents_ws/src/mader/mader/scripts/dynamic_corridor.py 80 name:=dynamic_corridor log:=/home/gsk/.ros/log/6d3751cc-234c-11ef-8c52-70b5e83420b1/dynamic_corridor-7.log]. log file: /home/gsk/.ros/log/6d3751cc-234c-11ef-8c52-70b5e83420b1/dynamic_corridor-7*.log Traceback (most recent call last): File "/home/gsk/Dynamic_multi_agents_ws/src/mader/mader/scripts/mader_commands.py", line 11, in import rospy File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/init.py", line 49, in from .client import spin, myargv, init_node, \ File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/client.py", line 52, in import roslib File "/opt/ros/melodic/lib/python2.7/dist-packages/roslib/init.py", line 50, in from roslib.launcher import load_manifest # noqa: F401 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/ros/melodic/lib/python2.7/dist-packages/roslib/launcher.py", line 42, in import rospkg ModuleNotFoundError: No module named 'rospkg' Traceback (most recent call last): File "/home/gsk/Dynamic_multi_agents_ws/src/mader/submodules/behavior_selector/scripts/behavior_selector_node.py", line 2, in import rospy File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/init.py", line 49, in from .client import spin, myargv, init_node, \ File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/client.py", line 52, in import roslib File "/opt/ros/melodic/lib/python2.7/dist-packages/roslib/init.py", line 50, in from roslib.launcher import load_manifest # noqa: F401 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/ros/melodic/lib/python2.7/dist-packages/roslib/launcher.py", line 42, in import rospkg ModuleNotFoundError: No module named 'rospkg' [SQ01s/mader_commands-2] process has died [pid 310, exit code 1, cmd /home/gsk/Dynamic_multi_agents_ws/src/mader/mader/scripts/mader_commands.py __name:=mader_commands log:=/home/gsk/.ros/log/6d3751cc-234c-11ef-8c52-70b5e83420b1/SQ01s-mader_commands-2.log]. log file: /home/gsk/.ros/log/6d3751cc-234c-11ef-8c52-70b5e83420b1/SQ01s-mader_commands-2.log Traceback (most recent call last): File "/opt/ros/melodic/lib/jsk_rviz_plugins/rosconsole_overlay_text.py", line 7, in import rospy File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/init.py", line 49, in from .client import spin, myargv, init_node, \ File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/client.py", line 52, in import roslib File "/opt/ros/melodic/lib/python2.7/dist-packages/roslib/init.py", line 50, in from roslib.launcher import load_manifest # noqa: F401 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/ros/melodic/lib/python2.7/dist-packages/roslib/launcher.py", line 42, in import rospkg ModuleNotFoundError: No module named 'rospkg' [behavior_selector-5] process has died [pid 318, exit code 1, cmd /home/gsk/Dynamic_multi_agents_ws/src/mader/submodules/behavior_selector/scripts/behavior_selector_node.py __name:=behavior_selector __log:=/home/gsk/.ros/log/6d3751cc-234c-11ef-8c52-70b5e83420b1/behavior_selector-5.log]. log file: /home/gsk/.ros/log/6d3751cc-234c-11ef-8c52-70b5e83420b1/behavior_selector-5.log [SQ01s/rosconsole_overlay_text-9] process has died [pid 327, exit code 1, cmd /opt/ros/melodic/lib/jsk_rviz_plugins/rosconsole_overlay_text.py name:=rosconsole_overlay_text log:=/home/gsk/.ros/log/6d3751cc-234c-11ef-8c52-70b5e83420b1/SQ01s-rosconsole_overlay_text-9.log]. log file: /home/gsk/.ros/log/6d3751cc-234c-11ef-8c52-70b5e83420b1/SQ01s-rosconsole_overlay_text-9*.log [ INFO] [1717599663.933602689]: Planner initialized 3840bab4-7e7d-4a80-9ba7-aeae38a4fc06 3840bab4-7e7d-4a80-9ba7-aeae38a4fc06 3840bab4-7e7d-4a80-9ba7-aeae38a4fc06 image image image ![Uploading image.png…]() image image image

jtorde commented 5 months ago

Hi @GSKun1,

Which ROS, Ubuntu, and Python version are you using? This error may happen because you are trying to use a version of Python that is not the same as the version that ROS uses (more info in the answers to this question. In some cases, running pip install rospkg may solve the issue.

GSKun1 commented 5 months ago

ROS melodic,ubuntu 18.04,python 3.11.7

GSKun1 commented 5 months ago

Hi, Thank you for your answer. After I run pip install rospkg, the error is reduced but still exists as shown below 3fdd3f0e-21c0-4d54-987e-51edd4bee572

jtorde commented 5 months ago

Ok, we made some progress. The error from _tf2 import dynamic module does not define module export function now seems to happen because tf2 is compiled using Python 2.7, while you are using Python 3. Some options I'd try:

GSKun1 commented 5 months ago

Thank you. I'll try again.

GSKun1 commented 5 months ago

I successfully solved the problem when I tried the third solution, thanks!