ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Running a planner executable from a node

asked 2020-04-08 10:26:16 -0500

mustafa404 gravatar image

Hello,

I have created a service call that runs a terminal command which is running an executable. I am integrating the PDDL into ROS(kinetic). To run the command simply on terminal I type :

./ff -p /home/mydirectory/pddl_files/ -o domain.pddl -f problem.pddl > solution.txt

As a python file I am able to run it like this:

import os
os.system("./ff -p /home/mydirectory/pddl_files/ -o domain.pddl -f problem.pddl > solution.txt")

It runs fine in terminal and as a python file but in ROS it gives me the following error:

sh: 1: ./ff: not found

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-04-08 10:32:33 -0500

mustafa404 gravatar image

I made rookie mistake:

Change directory also required: os.chdir("/home/mydirectory/pddl_files/")

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-04-08 10:26:16 -0500

Seen: 94 times

Last updated: Apr 08 '20