Skip to content

Commit

Permalink
Address comments, fix battery_state and navigate_to_pose result parsi…
Browse files Browse the repository at this point in the history
…ng, add additional check as temporary fix for race condition

Signed-off-by: Aaron Chong <[email protected]>
  • Loading branch information
aaronchongth committed Dec 3, 2024
1 parent bb78302 commit 9cf376a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ We recommend setting up `zenoh-bridge-ros2dds` with the released standalone bina

Most of the tests have been performed using `rmw-cyclonedds-cpp`, while other RMW implementations have shown varying results. Support and testing with other RMW implementations will be set up down the road.

> [!WARNING]
> This has so far only been tested in simulation, and will undergo updates and changes as more testing is performed. Use at your own risk. For the legacy implementation, check out the [`legacy`](https://github.com/open-rmf/free_fleet/tree/legacy) branch.
## Dependency installation, source build and setup

System dependencies,
Expand Down Expand Up @@ -294,7 +291,6 @@ ros2 run rmf_demos_tasks dispatch_patrol \

## TODOs

* hardware testing
* attempt to optimize tf messages (not all are needed)
* ROS 1 nav support
* custom actions to be abstracted
Expand Down
4 changes: 1 addition & 3 deletions free_fleet/free_fleet/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,6 @@ class NavigateToPose_GetResult_Response(
typename='NavigateToPose_GetResult_Response'
):
status: pycdr2.types.int8
NONE: pycdr2.types.uint16
error_code: pycdr2.types.uint16
error_msg: str


# https://github.com/ros-navigation/navigation2/blob/main/nav2_msgs/action/NavigateToPose.action
Expand Down Expand Up @@ -205,6 +202,7 @@ class ActionMsgs_CancelGoal_Response(
# https://github.com/ros2/common_interfaces/blob/rolling/sensor_msgs/msg/BatteryState.msg
@dataclass
class SensorMsgs_BatteryState(IdlStruct, typename='SensorMsgs_BatteryState'):
header: Header
voltage: pycdr2.types.float32
temperature: pycdr2.types.float32
current: pycdr2.types.float32
Expand Down
8 changes: 6 additions & 2 deletions free_fleet_adapter/free_fleet_adapter/nav2_robot_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,12 @@ def update(self, state: rmf_easy.RobotState):
# TODO(ac): use an enum to record what type of execution it is,
# whether navigation or custom executions
if self.nav_goal_id is not None and self._is_navigation_done():
self.execution.finished()
self.execution = None
# TODO(ac): Refactor this check as as self._is_navigation_done
# takes a while and the execution may have become None due to
# task cancellation.
if self.execution is not None:
self.execution.finished()
self.execution = None
self.nav_goal_id = None
self.replan_counts = 0
else:
Expand Down

0 comments on commit 9cf376a

Please sign in to comment.