Conversation
When a robot starts with `simulation: :kinematic`, the `JointSupervisor`
now automatically creates `OpenLoopPositionEstimator` sensors for each
actuator that doesn't already have one.
This ensures that simulated actuators publish `JointState` messages
without requiring manual sensor configuration, making simulation mode
work out of the box with tools like `bb_liveview`.
Changes:
- `JointSupervisor`: Add `build_auto_position_estimators/4` to create
sensors named `:{actuator_name}_position_estimator` for actuators
without existing position feedback sensors
- `OpenLoopPositionEstimator`: Handle `{:bb, path, message}` tuple
format from PubSub subscriptions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
OpenLoopPositionEstimatorsensors for actuators in simulation modeOpenLoopPositionEstimatorto handle PubSub message formatProblem
When using
bb_liveviewwith a robot that has actuators defined (likebb_example_wx200), moving joint sliders in simulation mode didn't update the 3D visualisation. This was because:BB.Sim.Actuator) publishBeginMotionmessages, notJointStateJointStatemessages are needed for the visualisation to updateOpenLoopPositionEstimatorsensors to convertBeginMotion→JointStateSolution
When a robot starts with
simulation: :kinematic, theJointSupervisornow automatically createsOpenLoopPositionEstimatorsensors for each actuator that doesn't already have one. The auto-generated sensors are named:{actuator_name}_position_estimator.This ensures simulation mode works out of the box without requiring manual sensor configuration.
Changes
lib/bb/joint_supervisor.exbuild_auto_position_estimators/4to create sensors for actuators without existing position feedbackhas_position_sensor_for_actuator?/2to check if an actuator already has position feedbacklib/bb/sensor/open_loop_position_estimator.exhandle_info/2clause for{:bb, path, message}tuple format from PubSubtest/bb/sim/simulation_test.exsJointStatemessagesTest plan
mix check --no-retrypasses (except pre-existing flaky test)bb_example_wx200in simulation mode