-
Notifications
You must be signed in to change notification settings - Fork 1
189 - Virtual Camera for Simulation & 2026 Assets #190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
189 - Virtual Camera for Simulation & 2026 Assets #190
Conversation
df6cbdd to
5070c8d
Compare
mlecriva
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
I've added some suggestions about using 4×4 homogeneous transformation matrices instead of separate 3×3 rotation matrices and translation vectors.
From my experience with similar computations in a previous robotics project, this approach:
- Simplifies transformation chains (M_result = M1 @ M2 vs manual R/t composition)
- Reduces the number of angle ↔ matrix conversions, which helps preserve numerical precision
I used Claude to generate the code examples, so the implementation details may need refinement but the underlying equations are based on work I've done before.
Let me know if you'd like to discuss this synchronously, I want to make sure the proposed approach covers all the use cases.
Signed-off-by: Eric Courtois <eric.courtois@gmail.com>
Python is using the equivalent en C "double" type for its "float" type. So all C arrays bound to the Python code must use "double". Signed-off-by: Eric Courtois <eric.courtois@gmail.com>
The wizard type must be choice_str, not choice_integer. Signed-off-by: Eric Courtois <eric.courtois@gmail.com>
Signed-off-by: Eric Courtois <eric.courtois@gmail.com>
The path must be given by the Camera class to support variant of Raspberry Pi cameras. Signed-off-by: Eric Courtois <eric.courtois@gmail.com>
Signed-off-by: Eric Courtois <eric.courtois@gmail.com>
Signed-off-by: Eric Courtois <eric.courtois@gmail.com>
Signed-off-by: Eric Courtois <eric.courtois@gmail.com>
Signed-off-by: Eric Courtois <eric.courtois@gmail.com>
Signed-off-by: Eric Courtois <eric.courtois@gmail.com>
Signed-off-by: Eric Courtois <eric.courtois@gmail.com>
Signed-off-by: Eric Courtois <eric.courtois@gmail.com>
Signed-off-by: Eric Courtois <eric.courtois@gmail.com>
Signed-off-by: Eric Courtois <eric.courtois@gmail.com>
Signed-off-by: Eric Courtois <eric.courtois@gmail.com>
Signed-off-by: Eric Courtois <eric.courtois@gmail.com>
Signed-off-by: Eric Courtois <eric.courtois@gmail.com>
Signed-off-by: Eric Courtois <eric.courtois@gmail.com>
…I Cam Signed-off-by: Eric Courtois <eric.courtois@gmail.com>
Signed-off-by: Eric Courtois <eric.courtois@gmail.com>
Signed-off-by: Eric Courtois <eric.courtois@gmail.com>
…ng mode Signed-off-by: Eric Courtois <eric.courtois@gmail.com>
The virtual camera in Monitor write its images in shared memory. Implement a new camera class SimCamera that reads data from shared memory. Signed-off-by: Eric Courtois <eric.courtois@gmail.com>
Replace the simplified 2D calibration logic (assuming fixed camera
pitch/roll) with a complete 6-Degree-Of-Freedom (6DOF) estimation.
This allows for arbitrary camera mounting orientations.
Key changes:
- Models: Add roll/pitch/yaw to `CameraExtrinsicParameters`.
- Math:
- Implement full 3D matrix transformations for coordinate frame
conversions (Camera <-> Robot <-> Table).
- Add `euler_angles_to_rotation_matrix` utility.
- Fix `R_tm` (Marker-to-Table) rotation matrix to correctly align axes
(Z-up consistency).
- Detection:
- Update `get_camera_position_on_table` to return full 3D orientation.
- Update `get_camera_position_in_robot` to compute relative camera pose
using matrix inversion ($T_{cr} = T_{rt}^{-1} \times T_{ct}$).
- Server:
- Update `/robot_position` to derive robot pose from full 6DOF camera
pose.
- Update `/camera_calibration` to return extended parameters.
- Config: Switch extrinsic parameters storage from YAML to JSON.
Signed-off-by: Eric Courtois <eric.courtois@gmail.com>
Since we are now using a Raspberry Pi camera, there is no risk anymore of contention on USB ports with cogip-detector. Signed-off-by: Eric Courtois <eric.courtois@gmail.com>
Signed-off-by: Eric Courtois <eric.courtois@gmail.com>
Signed-off-by: Eric Courtois <eric.courtois@gmail.com>
The discover process did not differentiate a strategy class declared in the module with an imported one, breaking discovery of inherited strategies. Signed-off-by: Eric Courtois <eric.courtois@gmail.com>
Signed-off-by: Eric Courtois <eric.courtois@gmail.com>
Signed-off-by: Eric Courtois <eric.courtois@gmail.com>
If waitUpdate is used in an async task or in a thread, it will prevent the related thread to terminated properly on program exit or reset. So in these cases, add a timeout to sem_wait() to not block the threads indefinitely. The waitUpdate() function now returns a bool: - true if the signal was received - false if timed out Use it in async tasks in Planner. Signed-off-by: Eric Courtois <eric.courtois@gmail.com>
This was not updated when is_intermediate attribute has been added to the Pose class and "intermediate_pose_reached" message was sent by the firmware. Signed-off-by: Eric Courtois <eric.courtois@gmail.com>
Signed-off-by: Eric Courtois <eric.courtois@gmail.com>
1a742f7 to
7ec2dfe
Compare
mlecriva
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR introduces a Virtual Camera system, allowing the robot to "see" the virtual table in the Monitor. This is a major step towards full-stack simulation. It also integrates Eurobot 2026 rules and improves camera calibration.
🎮 Virtual Camera & Simulation ### (Major)
🎨 Monitor (Eurobot 2026)
📷 Vision & Calibration
✅ Verification