Skip to content

feat: add new models, red bucket and drag support with ball handling enhancements#17

Open
l-encre wants to merge 3 commits intochenlongos:3d-frontfrom
l-encre:issue8-lencre
Open

feat: add new models, red bucket and drag support with ball handling enhancements#17
l-encre wants to merge 3 commits intochenlongos:3d-frontfrom
l-encre:issue8-lencre

Conversation

@l-encre
Copy link

@l-encre l-encre commented Mar 21, 2026

This pull request adds new interactive objects and models to the robot simulation, and significantly enhances the robot's autonomous behaviors to support more complex tasks such as picking up a ball and placing it in a red bucket. The changes improve the drag-and-drop logic, expand the simulation environment, and introduce logic for multi-stage tasks.

Simulation Environment Enhancements:

  • Added a red bucket (bucket) as a new draggable object alongside the ball, and updated the environment state to track both (src/App.tsx) [1] [2].
  • Updated the list of available models to include "找到小球并拾取示例" and "找到红桶放下小球示例" for new task demonstrations (src/App.tsx).

Drag-and-Drop and Interaction Logic:

  • Refactored mouse event handlers to support dragging both the ball and the bucket, ensuring only one object is dragged at a time and preventing dragging the ball while it is held by the robot (src/App.tsx) [1] [2].
  • Improved cursor feedback and object selection logic for a more intuitive user experience when interacting with draggable objects (src/App.tsx).

Robot Arm and Task State Management:

  • Enhanced the robot arm state to track whether it is holding the ball (hasBall) and updated logic for picking up and dropping the ball to set this state appropriately (src/App.tsx) [1] [2] [3].

Autonomous Behavior and Model Inference:

  • Implemented logic for the new models to enable the robot to autonomously find and pick up the ball, and, if required, carry it to the bucket and place it inside. The robot now switches goals and actions based on whether it is currently holding the ball (src/App.tsx) [1] [2].
  • Refactored the inference loop to pause robot movement while the arm is busy and to trigger appropriate actions (e.g., pick up or drop) when the robot is close to its target or the bucket (src/App.tsx) [1] [2].

Code Quality and Behavior Smoothing:

  • Improved temporal ensembling and smoothing of robot movement predictions, and cleaned up related code for better maintainability (src/App.tsx) [1] [2].

These changes collectively enable more complex, multi-step autonomous tasks in the simulation, while improving user interaction and code clarity.

l-encre added 3 commits March 21, 2026 13:23
- 添加红色方块(红桶)到场景中,可鼠标拖动
- 修复多对象拖动逻辑,支持同时拖动网球和红桶
- 更新.gitignore忽略IDE配置
- 更新依赖包版本锁定
- 添加“找到小球并拾取示例”
- 添加“找到红桶放下小球示例”
- stop pick-up demo after ball is grabbed
- add startup warnings for invalid initial hold states
- prevent dragging the ball while it is held
@l-encre l-encre changed the title Add red bucket and drag support with ball handling enhancements feat: add new models, red bucket and drag support with ball handling enhancements Mar 21, 2026
@BoBoDai
Copy link
Collaborator

BoBoDai commented Mar 21, 2026

放下球的时候位置不够精准,可以尝试优化

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.

2 participants