Skip to content

Commit

Permalink
Try without shell=True
Browse files Browse the repository at this point in the history
Signed-off-by: Pintaudi Giorgio <[email protected]>
  • Loading branch information
LastStarDust committed Jul 31, 2024
1 parent b4a15dc commit ac0fe1f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def generate_node():
def trigger_callback():
command = 'ros2 topic pub --once --max-wait-time-secs 10 --keep-alive 1 \
/input std_msgs/msg/String "data: Hello World"'
p = Popen(command, shell=True, stdout=PIPE, stderr=PIPE)
p = Popen(command.split(), stdout=PIPE, stderr=PIPE)
stdout, stderr = p.communicate()
print("stdout: ", stdout)
print("stderr: ", stderr)
Expand Down

0 comments on commit ac0fe1f

Please sign in to comment.