Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
GSKun1 opened this issue Jun 5, 2024 · 6 comments

Comments

@GSKun1
Copy link

GSKun1 commented Jun 5, 2024

[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
Copy link
Collaborator

jtorde commented Jun 5, 2024

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
Copy link
Author

GSKun1 commented Jun 6, 2024

ROS melodic,ubuntu 18.04,python 3.11.7

@GSKun1
Copy link
Author

GSKun1 commented Jun 6, 2024

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
Copy link
Collaborator

jtorde commented Jun 6, 2024

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:

  • Try creating a Python 2.7 virtual environment and run MADER from it (see the answer to this question)

  • Try compiling tf2 for Python 3 (see the answer to this question)

  • Try changing these shebang lines to #!/usr/bin/env python2.7

@GSKun1
Copy link
Author

GSKun1 commented Jun 8, 2024

Thank you.
I'll try again.

@GSKun1
Copy link
Author

GSKun1 commented Jun 8, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants