dynamicalnodes 0.2.0__tar.gz → 0.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dynamicalnodes
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: dynamicalnodes is a Python library for modeling general control systems.
5
5
  Author-email: Nehal Singh Mangat <nehalsinghmangat.software@gmail.com>
6
6
  License-Expression: MIT
@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
7
7
 
8
8
  [project]
9
9
  name = "dynamicalnodes"
10
- version = "0.2.0"
10
+ version = "0.2.1"
11
11
  description = "dynamicalnodes is a Python library for modeling general control systems."
12
12
  readme = "README.md"
13
13
  requires-python = ">=3.12"
@@ -20,7 +20,9 @@ def __getattr__(name):
20
20
  return mod if attr is None else getattr(mod, attr)
21
21
  except ImportError as e:
22
22
  raise ImportError(
23
- f"{name} requires ROS2 dependencies. Install with: pip install dynamicalnodes[ros2]\n"
23
+ f"{name} requires a ROS2 installation (rclpy and the ROS message packages are "
24
+ f"system packages, not on PyPI). Install ROS2 and source its setup script, "
25
+ f"e.g. `source /opt/ros/jazzy/setup.bash`.\n"
24
26
  f"Original error: {e}"
25
27
  ) from e
26
28
  raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
@@ -450,6 +450,8 @@ class ROSNode:
450
450
  True
451
451
  >>> "SingleThreadedExecutor" in content
452
452
  True
453
+ >>> "ExternalShutdownException" in content and "if rclpy.ok():" in content
454
+ True
453
455
  >>> "_u_k_seen" in content
454
456
  True
455
457
  >>> os.unlink(path)
@@ -751,7 +753,7 @@ class ROSNode:
751
753
  blank()
752
754
  ln("import rclpy")
753
755
  ln("from rclpy.node import Node")
754
- ln("from rclpy.executors import SingleThreadedExecutor")
756
+ ln("from rclpy.executors import ExternalShutdownException, SingleThreadedExecutor")
755
757
  ln("from rclpy.callback_groups import ReentrantCallbackGroup")
756
758
  ln("from rclpy.qos import QoSProfile, QoSHistoryPolicy, QoSReliabilityPolicy")
757
759
  blank()
@@ -1121,11 +1123,12 @@ class ROSNode:
1121
1123
  ln(" executor.add_node(node)")
1122
1124
  ln(" try:")
1123
1125
  ln(" executor.spin()")
1124
- ln(" except KeyboardInterrupt:")
1126
+ ln(" except (KeyboardInterrupt, ExternalShutdownException):")
1125
1127
  ln(" pass")
1126
1128
  ln(" finally:")
1127
1129
  ln(" node.destroy_node()")
1128
- ln(" rclpy.shutdown()")
1130
+ ln(" if rclpy.ok():")
1131
+ ln(" rclpy.shutdown()")
1129
1132
  blank()
1130
1133
  blank()
1131
1134
  ln('if __name__ == "__main__":')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dynamicalnodes
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: dynamicalnodes is a Python library for modeling general control systems.
5
5
  Author-email: Nehal Singh Mangat <nehalsinghmangat.software@gmail.com>
6
6
  License-Expression: MIT
File without changes
File without changes
File without changes