KCL-Planning / rosplan_demos

Tutorials and Demos for ROSPlan.
BSD 2-Clause "Simplified" License
48 stars 31 forks source link

Stage Exploration Demo fails #49

Closed gvarga97 closed 3 years ago

gvarga97 commented 3 years ago

Hi guys!

I'm trying to run the following demo

I followed the instructions from the README.md file, everything is built well, but in the last step when I want to launch the demo with: roslaunch rosplan_stage_exploration_demo lt13_exploration.launch

I get the following errors:

ERROR: cannot launch node of type [rosplan_interface_mapping/rp_roadmap_server]: Cannot locate node of type [rp_roadmap_server] in package [rosplan_interface_mapping]. Make sure file exists in package path and permission is set to executable (chmod +x)
ERROR: cannot launch node of type [rosplan_knowledge_base/knowledgeBase]: Cannot locate node of type [knowledgeBase] in package [rosplan_knowledge_base]. Make sure file exists in package path and permission is set to executable (chmod +x)
ERROR: cannot launch node of type [rosplan_planning_system/problemInterface]: Cannot locate node of type [problemInterface] in package [rosplan_planning_system]. Make sure file exists in package path and permission is set to executable (chmod +x)
ERROR: cannot launch node of type [rosplan_planning_system/popf_planner_interface]: Cannot locate node of type [popf_planner_interface] in package [rosplan_planning_system]. Make sure file exists in package path and permission is set to executable (chmod +x)
ERROR: cannot launch node of type [rosplan_planning_system/pddl_esterel_plan_parser]: Cannot locate node of type [pddl_esterel_plan_parser] in package [rosplan_planning_system]. Make sure file exists in package path and permission is set to executable (chmod +x)
ERROR: cannot launch node of type [rosplan_planning_system/pddl_esterel_plan_dispatcher]: Cannot locate node of type [pddl_esterel_plan_dispatcher] in package [rosplan_planning_system]. Make sure file exists in package path and permission is set to executable (chmod +x)
process[rosplan_sensing_interface-14]: started with pid [21395]
ERROR: cannot launch node of type [rosplan_interface_movebase/rpmovebase]: Cannot locate node of type [rpmovebase] in package [rosplan_interface_movebase]. Make sure file exists in package path and permission is set to executable (chmod +x)
process[coordinator-16]: started with pid [21397]
process[graph_saver-17]: started with pid [21403]
process[esterel_plan_viewer-18]: started with pid [21405]
[ WARN] [1612546593.281020518]: Request for map failed; trying again...
Traceback (most recent call last):
  File "/home/gvg/catkin_ws/src/rosplan_demos/rosplan_stage_exploration_demo/scripts/main_executor.py", line 12, in <module>
    from rosplan_knowledge_msgs.srv import *
ImportError: No module named srv
================================================================================REQUIRED process [coordinator-16] has died!
process has died [pid 21397, exit code 1, cmd /home/gvg/catkin_ws/src/rosplan_demos/rosplan_stage_exploration_demo/scripts/main_executor.py __name:=coordinator __log:=/home/gvg/.ros/log/af62ec10-67d8-11eb-ab8f-f8281958696f/coordinator-16.log].
log file: /home/gvg/.ros/log/af62ec10-67d8-11eb-ab8f-f8281958696f/coordinator-16*.log
Initiating shutdown!
================================================================================

Has any one of you encountered such an issue? If yes, how did you solve it?

Thanks in advance!

gerardcanal commented 3 years ago

Hi @gvarga97, It seems to me either you did not compile your workspace (i.e., by running catkin build or catkin_make from the workspace folder) or you did not source the devel/setup.bash of the workspace. Those would be possible reasons for the launcher not finding any of the nodes in their packages. Can you check if this solves the issue?

PS. I edited your message to give it nicer formatting.

gvarga97 commented 3 years ago

Hi @gerardcanal !

Thanks for the quick reply!

I doubled-checked everything but unfortunately it still not works. I compiled by catkin_make (everything successful) and after that I also did not forget export TURTLEBOT3_MODEL=waffle as well as source devel/setup.bash.

Furthermore, I tried to read the CMakeLists.txt and find out from which files for example the knowledgeBase node is built, and gave those source files execute permission manually. (I did the same way with the other nodes/files as well.)

I guess I will need to provide more information about the issue, so just let me know what files etc. I have to share.

PS. Thanks for the formatting!

m312z commented 3 years ago

Hello both,

Can I check that you have cloned/compiled both rosplan and rosplan_demos?

Edit: Nevermind - I notice that both are included in the instructions of that demo.

gvarga97 commented 3 years ago

Yep, I did. Both rosplan and rosplan_demos are in my catkin_ws/src.

gerardcanal commented 3 years ago

Hello, The cpp source files shouldn't need exec permissions. Can you check the nodes are correctly compiled? For my setup, the knowledgeBase executable is in devel/lib/rosplan_knowledge_base/knowledgeBase. Can you check this one is there and it has execution permission? The other missing executables should also be inside devel/lib/package_name. I could reproduce the error by manually removing the executable, so it seems it may not be there.

If the executable is there, can you try to run one of the nodes manually to see if it is found that way? I.e., rosrun rosplan_knowledge_base knowledgeBase

gvarga97 commented 3 years ago

Okay, so here's what I've done: after deleting the build and devel folders, I compiled with catkin build instead of catkin_make. And everything worked! Now, in a new terminal, I also deleted the build and devel folders, compiled with catkin_make and everything worked! After that, I deleted my local rosplan and rosplan_demos repositories, cloned them again, only used catkin_make and everything worked! So I don't know what caused this initial issue at me, but catkin build solved it.

I also checked what you suggested me, now that everything is working, the files are in devel/lib/package_name and they have execute permission. And I can also run the nodes manually, e.g. rosrun rosplan_knowledge_base knowledgeBase.

To sum it up, I don't know what caused this problem at me initially, but if in the future this will happen to someone else too, I suggest using catkin build or maybe re-compilation multiple times with catkin_make even if everything was indicated as successfully built (because I guess at first those files you mentioned were not in the devel/lib/package_name.)

Anyways, thank you very much for your time and help @gerardcanal and @m312z .