Skip to content

Commit

Permalink
Do not publish task plan message if plan is None
Browse files Browse the repository at this point in the history
  • Loading branch information
sea-bass committed Jun 28, 2023
1 parent 35099d6 commit 1b7f553
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pyrobosim_ros/examples/demo_pddl_planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,10 @@ def do_plan(self):
)
if self.get_parameter("verbose").value == True:
self.get_logger().info(f"{plan}")
plan_msg = task_plan_to_ros(plan)
self.plan_pub.publish(plan_msg)

if plan:
plan_msg = task_plan_to_ros(plan)
self.plan_pub.publish(plan_msg)
self.latest_goal = None
self.planning = False

Expand Down

0 comments on commit 1b7f553

Please sign in to comment.