Skip to content

Commit

Permalink
Prevent data collection from making file when not in use
Browse files Browse the repository at this point in the history
  • Loading branch information
eomielan committed Sep 23, 2024
1 parent cf2363d commit 71694ac
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ def shutdown_handler(signum: int, frame: Any) -> None:

def main(args=None):
rclpy.init(args=args)
node = DataCollectionNode()
if is_collection_enabled():
try:
node = DataCollectionNode()
# TODO Explore alternatives to using the signal library, such as ROS event handlers
signal.signal(signal.SIGINT, shutdown_handler)
rclpy.spin(node)
Expand Down

0 comments on commit 71694ac

Please sign in to comment.