Skip to content

add autoconnect back#683

Closed
paul-nechifor wants to merge 3 commits intodevfrom
add-autoconnect-back
Closed

add autoconnect back#683
paul-nechifor wants to merge 3 commits intodevfrom
add-autoconnect-back

Conversation

@paul-nechifor
Copy link
Contributor

No description provided.

@chatgpt-codex-connector
Copy link

💡 Codex Review

@rpc
<<<<<<< HEAD
def stop(self) -> None:
=======
def stop(self):
>>>>>>> deac770f (squash)
self.connection.stop()

P0 Badge Remove unresolved merge markers in G1 stop RPC

The G1ConnectionModule.stop implementation still contains <<<<<<< HEAD/=======/>>>>>>> markers. Python will fail to import this module, so the G1 robot cannot start or stop. Clean up the conflict and choose a single definition for the stop RPC.


def __call__(self, *args, **kwargs):
# For stop/close/shutdown, use call_nowait to avoid deadlock
# (the remote side stops its RPC service before responding)
if self.name in ("stop"):
if self.rpc:
self.rpc.call_nowait(f"{self.remote_name}/{self.name}", (args, kwargs))
self.stop_client()
return None

P1 Badge RpcCall.stop calls undefined stop_client

The new RpcCall wrapper calls self.stop_client() in the stop branch, but RpcCall does not define that method nor keep a reference to RPCClient. Invoking a remote stop() now raises AttributeError and leaves the RPC client running. Pass the owning RPCClient into RpcCall or delegate cleanup through a provided callback.


@rpc
def set_HolonomicLocalPlanner_reset(self, callable) -> None:
self.reset_local_planner = callable
self.reset_local_planner.rpc = self.rpc
@rpc
def set_HolonomicLocalPlanner_atgl(self, callable) -> None:
self.check_goal_reached = callable
self.check_goal_reached.rpc = self.rpc

P1 Badge Autoconnect setters assign attributes on bound methods

The new setter RPCs assign self.reset_local_planner.rpc = self.rpc (and likewise for check_goal_reached). When autoconnect injects a bound method from HolonomicLocalPlanner, bound method objects do not support attribute assignment, so these setters raise AttributeError and the modules never wire up. Drop the attribute assignment or wrap the callable in a mutable object before attaching.


# Start Foxglove bridge for visualization
foxglove_bridge = FoxgloveBridge()
foxglove_bridge.acquire()

P1 Badge Tests call acquire/release on FoxgloveBridge which lacks them

The object tracking test now calls FoxgloveBridge().acquire() and later release(), but FoxgloveBridge only implements start and stop. Running this test will raise AttributeError before the module initializes. Either update FoxgloveBridge to expose acquire/release or revert the test to use the existing start/stop RPCs.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

@paul-nechifor
Copy link
Contributor Author

Closed in favor of #684

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant