PlanSys2/ros2_planning_system

Add instructions to the doc showing how to load a problem file

Closed this issue · 6 comments

I was wondering ho to load a pddl problem in plansys2. I found that this feature is already implemented thanks to #200 but there are no references to it in the tutorial or doc pages.
I think it could be useful for many users...
I can make a pull request to the documentation but at the moment I don't know what is the right command.
Maybe @roveri-marco or @fmrico can help in this regard.
Thanks!

fmrico commented

Hi @antbono . Thanks for opening this. I will try to address it soon. I don't know if @roveri-marco can also do it 😉

Best

I can work on it after coming back from vacation!

Any updates on this? I also want to know how to do it but I am not finding an answer.
Is it possible to load the problem information with a launchfile? like we do for the domain problem?
something like: ros2 launch plansys2_bringup plansys2_bringup_launch_distributed.py model_file:=/tmp/simple_example.pddl problem_file:=problem_file.pdd

I understood that I can load problem info with the plansys2_terminal but it always crash and I have to start a new terminal afterwards:

ros2 run plansys2_terminal plansys2_terminal < problem
[INFO] [1708097941.971921837] [terminal]: No problem file specified.
ROS2 Planning System console. Type "quit" to finish
> set instance r2d2 robot
> set instance wp1 waypoint
> set instance wp2 waypoint
> set instance wp3 waypoint
> set instance wp4 waypoint
> set instance wp5 waypoint
> set instance wp6 waypoint
> 
> set predicate (path wp1 wp2)
> set predicate (path wp2 wp3)
> set predicate (path wp3 wp4)
> set predicate (path wp4 wp5)
> set predicate (path wp5 wp6)
> 
> set predicate (robot_at r2d2 wp1)
> [ros2run]: Segmentation fault

EDIT: I just noticed that in the rolling version, the bringup launch files have a problem_file launch argument for this.

Alternatively, on the terminal you can use the source command that is expecting a filename as argument, and the file can contains commands to specify the problem as well as all the commands allowed in the terminal.

Hi @Rezenders

Does the problem_file launch argument solve your problem? I think I fixed the crash problem in the terminal some time ago 🤔

Best

Yes, thanks :)