Skip to content

Commit

Permalink
codespell clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
David Conner committed Sep 26, 2024
1 parent c57c7fd commit 4929cd1
Show file tree
Hide file tree
Showing 25 changed files with 33 additions and 33 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Jazzy ![ROS Build Farm](https://build.ros2.org/job/Jdev__flexbe_behavior_engine_

Rolling ![ROS Build Farm](https://build.ros2.org/job/Rdev__flexbe_behavior_engine__ubuntu_noble_amd64/badge/icon)

> Note: This version 4+ breaks compatability with the FlexBE App. You must use the FlexBE WebUI [flexbe_webui](https://github.com/FlexBE/flexbe_webui.git) now.
> Note: This version 4+ breaks compatibility with the FlexBE App. You must use the FlexBE WebUI [flexbe_webui](https://github.com/FlexBE/flexbe_webui.git) now.

## Installation
Expand Down Expand Up @@ -58,7 +58,7 @@ from the `${WORKSPACE_ROOT}/src` folder will create:
These are intended to contain your custom FlexBE state implementations and HFSM-based behaviors.

This release of the FlexBE Behavior Engine requires version 4.1+ of the FlexBE UI.
This breaks compatability with the older FlexBE App and now requires use of the FlexBE WebUI tool.
This breaks compatibility with the older FlexBE App and now requires use of the FlexBE WebUI tool.

It is recommended to install the FlexBE WebUI user interface:

Expand Down
2 changes: 1 addition & 1 deletion flexbe_core/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ Changelog for package flexbe_core
* [flexbe_core] Added priority container
* [flexbe_core] Added some more documentation
* [flexbe_core] Fixed initialization of input userdata in inner statemachines
* [flexbe_core] Correctly preempt auxilliary control flows in concurrency container
* [flexbe_core] Correctly preempt auxiliary control flows in concurrency container
* [flexbe_core] Fixed a bug with concurrent execution:
State machines inside state machine inside concurrency containers still blocked during execution.
* [flexbe_core] Slightly reworked monitoring state
Expand Down
6 changes: 3 additions & 3 deletions flexbe_core/flexbe_core/behavior_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def get_behavior(self, be_key):
try:
return self._behavior_lib[be_key]
except KeyError:
Logger.logwarn(f"Did not find ID '{be_key}' in libary, updating...")
Logger.logwarn(f"Did not find ID '{be_key}' in library, updating...")
self.parse_packages()
return self._behavior_lib.get(be_key, None)

Expand Down Expand Up @@ -166,12 +166,12 @@ def __find_behavior():
try:
return __find_behavior()
except StopIteration:
Logger.logwarn("Did not find behavior '%s' in current libary, updating..." % be_name)
Logger.logwarn("Did not find behavior '%s' in current library, updating..." % be_name)
self.parse_packages()
try:
return __find_behavior()
except StopIteration:
Logger.logerr("Still cannot find behavior '%s' in libary after update, giving up!" % be_name)
Logger.logerr("Still cannot find behavior '%s' in library after update, giving up!" % be_name)
return None, None

def count_behaviors(self):
Expand Down
2 changes: 1 addition & 1 deletion flexbe_core/flexbe_core/core/event_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def _event_execute(self, *args, **kwargs):
repeat = True

if repeat or outcome is not None:
# As this is currently coded, a repeat command will immedately halt
# As this is currently coded, a repeat command will immediately halt
# call on_exit, then reenter the state
# (vs. an alternative to wait until outcome and then repeat)
self.on_exit(*args, **kwargs)
Expand Down
4 changes: 2 additions & 2 deletions flexbe_core/flexbe_core/core/operatable_state_machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def _execute_current_state(self):
# catch any exception and log here, but re-raise to preempt behavior
Logger.logerr("Failed to execute state '%s':\n%s - %s" % (self.current_state_label, str(type(exc)), str(exc)))
import traceback # pylint: disable=C0415
Logger.localinfo(traceback.format_exc().replace('%', '%%')) # Guard against exeception including format!
Logger.localinfo(traceback.format_exc().replace('%', '%%')) # Guard against exception including format!
outcome = None
if isinstance(exc, (StateError, StateMachineError, UserDataError)):
self._last_exception = exc
Expand Down Expand Up @@ -271,7 +271,7 @@ def process_sync_request(self):
Provide explicit sync as back-up functionality.
Should be used sparingly if there is no other choice
since it requires additional 8 byte + header update bandwith and time to restart mirror
since it requires additional 8 byte + header update bandwidth and time to restart mirror
"""
if self._inner_sync_request:
self._inner_sync_request = False
Expand Down
2 changes: 1 addition & 1 deletion flexbe_core/flexbe_core/core/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class State:
_preempted_name = 'preempted' # Define name here, but handle logic in derived class

def __init__(self, *args, **kwargs):
"""Initilize state instance."""
"""Initialize state instance."""
self._outcomes = _remove_duplicates(kwargs.get('outcomes', []))
io_keys = kwargs.get('io_keys', [])
self._input_keys = _remove_duplicates(kwargs.get('input_keys', []) + io_keys)
Expand Down
2 changes: 1 addition & 1 deletion flexbe_core/flexbe_core/proxy/proxy_action_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def __init__(self, topics=None, wait_duration=1.0):
Initialize the proxy with an optionally given set of clients.
@type topics: dictionary string - message class
@param topics: A dictionay containing a collection of topic - message type pairs.
@param topics: A dictionary containing a collection of topic - message type pairs.
@type wait_duration: int
@param wait_duration: Defines how long to wait for each client in the
Expand Down
2 changes: 1 addition & 1 deletion flexbe_core/flexbe_core/proxy/proxy_publisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def __init__(self, topics=None, qos=None, **kwargs):
Automatically creates a publisher for sending status messages.
@type topics: dictionary string - message class
@param topics: A dictionay containing a collection of topic - message type pairs.
@param topics: A dictionary containing a collection of topic - message type pairs.
@type _latch: bool
@param: _latch: Defines if messages on the given topics should be latched.
Expand Down
2 changes: 1 addition & 1 deletion flexbe_core/flexbe_core/proxy/proxy_subscriber_cached.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ def remove_last_msg(cls, topic, clear_buffer=False):
@classmethod
def make_persistant(cls, topic):
"""
Make the given topic persistant which means messages can no longer be removed.
Make the given topic persistent which means messages can no longer be removed.
Remove_last_msg will have no effect, only overwritten by a new message.
Expand Down
2 changes: 1 addition & 1 deletion flexbe_core/flexbe_core/proxy/proxy_transform_listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def initialize(node):

@staticmethod
def shutdown():
"""Shut down this proxy by reseting the transform listener."""
"""Shut down this proxy by resetting the transform listener."""
try:
ProxyTransformListener._listener = None
ProxyTransformListener._buffer = None
Expand Down
2 changes: 1 addition & 1 deletion flexbe_core/test/flexbe_logger_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

@pytest.mark.rostest
def generate_test_description():
"""Generate test descriptoin for flexbe_logger test."""
"""Generate test description for flexbe_logger test."""
path_to_test = os.path.dirname(__file__)

TEST_PROC_PATH = os.path.join(path_to_test, 'test_logger.py')
Expand Down
2 changes: 1 addition & 1 deletion flexbe_core/test/test_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def execute(self, userdata):
self.node.get_logger().info('test_throttle_logger_one - OK! ')

def test_throttle_logger_err_multi(self):
"""Test throttle logger with errrors."""
"""Test throttle logger with errors."""
self.node.get_logger().info('test_throttle_logger_err_multi ...')
self.node.declare_parameter('max_throttle_logging_size', 200)
self.node.declare_parameter('throttle_logging_clear_ratio', 0.35)
Expand Down
2 changes: 1 addition & 1 deletion flexbe_core/test/test_proxies.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ def execute_cb(goal_handle):
client = ProxyActionClient({'/invalid': BehaviorExecution}, wait_duration=.1)
self.assertFalse(client.is_available('/invalid'))
self.node.get_logger().info('test_action_client - OK! ')
del server # Through with instance, and explicitly calling del() to avoid ununsed warning
del server # Through with instance, and explicitly calling del() to avoid unused warning


if __name__ == '__main__':
Expand Down
6 changes: 3 additions & 3 deletions flexbe_input/flexbe_input/complex_action_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class ComplexActionServer:
@param execute_cb Optional callback that gets called in a separate thread whenever
a new goal is received, allowing users to have blocking callbacks.
Adding an execute callback also deactivates the goalCallback.
@param auto_start A boolean value that tells the ActionServer wheteher or not
@param auto_start A boolean value that tells the ActionServer whether or not
to start publishing as soon as it comes up.
THIS SHOULD ALWAYS BE SET TO FALSE TO AVOID RACE CONDITIONS and
start() should be called after construction of the server.
Expand Down Expand Up @@ -196,7 +196,7 @@ def internal_goal_callback(self, goal):
self.execute_condition.acquire()

try:
Logger.localinfo(f'A new goal {goal.goal_id} has been recieved by the single goal action server')
Logger.localinfo(f'A new goal {goal.goal_id} has been received by the single goal action server')

self.next_goal = goal
self.new_goal = True
Expand All @@ -220,7 +220,7 @@ def internal_preempt_callback(self, preempt):

# @brief Called from a separate thread to call blocking execute calls
def executeLoop(self):
"""Excute the server loop."""
"""Execute the server loop."""
loop_duration = Duration(seconds=0.1)

while (rclpy.ok()):
Expand Down
2 changes: 1 addition & 1 deletion flexbe_input/flexbe_input/input_action_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def get_input_type(self, request_type):
@return prompt, instance type, number of elements
"""
# Thse are the only types handled by this simple UI
# These are the only types handled by this simple UI
types = {BehaviorInput.Goal.REQUEST_INT: ('int', int, 1),
BehaviorInput.Goal.REQUEST_FLOAT: ('float', (float, int), 1), # int acceptable for desired float
BehaviorInput.Goal.REQUEST_2D: ('list of 2 numbers', (list, tuple), 2), # allow either list or tuple
Expand Down
2 changes: 1 addition & 1 deletion flexbe_mirror/flexbe_mirror/flexbe_mirror.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def _activate_mirror(self, struct_msg, start_time):
except Exception as exc: # pylint: disable=W0703
Logger.logerr(f'Exception in activate mirror: {type(exc)} started at {start_time.nanoseconds} ns ...\n {exc}')
Logger.localerr(f"{traceback.format_exc().replace('%', '%%')}")
self._running = False # normally set false in execute_mirror (but not if exeception)
self._running = False # normally set false in execute_mirror (but not if exception)

Logger.localwarn(f'Done executing mirror {self._active_id} from activation '
f'{self.get_elapsed_str(start_time)}')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,5 +148,5 @@ def get_deep_states(self):
f" - current state is NOT a list! Error type='{type(self._current_state)}'")
Logger.localerr(f" '{self._current_state.name}' ({self._current_state.state_id})")
raise TypeError(f"MirrorConcurrentContainer.get_deep_states '{self.name}' - "
f"current state is NOT a list! Errror type='{type(self._current_state)}'")
f"current state is NOT a list! Error type='{type(self._current_state)}'")
return deep_states
2 changes: 1 addition & 1 deletion flexbe_mirror/flexbe_mirror/mirror_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def __init__(self, target_name, target_path, given_outcomes, outcome_autonomy):
MirrorState._last_target_id = None # reset any time that we build a new state machine

if MirrorState._pub is None:
# Allow access to standard proxies initialied by flexbe_mirror
# Allow access to standard proxies initialized by flexbe_mirror
MirrorState._pub = ProxyPublisher()

@classmethod
Expand Down
2 changes: 1 addition & 1 deletion flexbe_msgs/action/BehaviorInput.action
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# If desired, custom request types can be defined and choosen here
# If desired, custom request types can be defined and chosen here
uint8 request_type

# Basic types (used by input_action_server, but otherwise optional)
Expand Down
2 changes: 1 addition & 1 deletion flexbe_msgs/action/BehaviorSynthesis.action
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SynthesisRequest request

---

# Provides feedback regarding possibly occured errors
# Provides feedback regarding possibly occurred errors
SynthesisErrorCodes error_code

# Result of behavior synthesis as a list of state instantiations
Expand Down
2 changes: 1 addition & 1 deletion flexbe_msgs/msg/Container.msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
int32 state_id # Unique 23-bit identifer for state
int32 state_id # Unique 23-bit identifier for state
string path # String path from top-level state machine
string[] children
string[] outcomes
Expand Down
4 changes: 2 additions & 2 deletions flexbe_onboard/flexbe_onboard/flexbe_onboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def __init__(self):
self._heartbeat_pub = self.create_publisher(BehaviorSync, Topics._ONBOARD_HEARTBEAT_TOPIC, 10)
self._status_pub = self.create_publisher(BEStatus, Topics._ONBOARD_STATUS_TOPIC, 10)

# Latch state map so we can retreive later if desired
# Latch state map so we can retrieve later if desired
latching_qos = QoSProfile(depth=1, durability=QoSDurabilityPolicy.TRANSIENT_LOCAL)
self._state_map_pub = self.create_publisher(StateMapMsg, Topics._STATE_MAP_TOPIC, qos_profile=latching_qos)

Expand Down Expand Up @@ -161,7 +161,7 @@ def _behavior_callback(self, beh_sel_msg):
Logger.logwarn(f'Received behavior start request for {beh_sel_msg.behavior_key} '
f'({beh_sel_msg.behavior_id}) while prior request was starting.\n Ignore second request!')
return
self._starting = True # Prevent two start requests from ocurring back to back
self._starting = True # Prevent two start requests from occurring back to back
self._trigger_ready = False # We have received the behavior selection request
self._ready_counter = 0
thread = threading.Thread(target=self._behavior_execution, args=[beh_sel_msg])
Expand Down
4 changes: 2 additions & 2 deletions flexbe_states/flexbe_states/input_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ def on_enter(self, userdata):
self._client.remove_result(self._action_topic)
self._return = None

# Retrive the goal for the BehaviorInput Action.
# Retrieve the goal for the BehaviorInput Action.
action_goal = BehaviorInput.Goal()
# Retrive the request type and message from goal.
# Retrieve the request type and message from goal.
action_goal.request_type = self._request
action_goal.msg = self._message
Logger.loghint(f"Onboard requests '{self._message}'")
Expand Down
2 changes: 1 addition & 1 deletion flexbe_states/flexbe_states/selection_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def on_enter(self, userdata):
Logger.localwarn(msg)
return

# Retrive the goal for the BehaviorInput Action.
# Retrieve the goal for the BehaviorInput Action.
action_goal = BehaviorInput.Goal(request_type=BehaviorInput.Goal.REQUEST_SELECTION,
items=userdata.items, msg=self._message)
Logger.loghint(f"Onboard requests '{self._message}' : {userdata.items}")
Expand Down
2 changes: 1 addition & 1 deletion flexbe_widget/flexbe_widget/behavior_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def __init__(self):
self._mirror_pub = self.create_publisher(ContainerStructure, Topics._MIRROR_STRUCTURE_TOPIC, 100)
self._heartbeat_pub = self.create_publisher(Int32, Topics._LAUNCHER_HEARTBEAT_TOPIC, 2)

# Latch state map so we can retreive later if desired
# Latch state map so we can retrieve later if desired
latching_qos = QoSProfile(depth=1, durability=QoSDurabilityPolicy.TRANSIENT_LOCAL)
self._state_map_pub = self.create_publisher(StateMapMsg, Topics._STATE_MAP_OCS_TOPIC, latching_qos)

Expand Down

0 comments on commit 4929cd1

Please sign in to comment.