Skip to content

feat(modeling): add SerialManipulatorSimulatorFriendly under marinholab::sas::core::modeling - #8

Merged
mmmarinho merged 1 commit into
mainfrom
add-modeling-serial-manipulator
Sep 23, 2026
Merged

mmmarinho merged 1 commit into
mainfrom
add-modeling-serial-manipulator

Conversation

@mmmarinho

Copy link
Copy Markdown
Contributor

Summary

Adds SerialManipulatorSimulatorFriendly to the marinholab_sas_core library under the new namespace marinholab::sas::core::modeling.

This is the C++ half of migrating M3_SerialManipulatorSimulatorFriendly out of sas_robot_driver_gazebo (where it lived in namespace DQ_robotics). The class name drops the M3_ prefix, per the plan.

What changed

  • New include/marinholab/sas/core/modeling/serial_manipulator_simulator_friendly.hpp — namespace marinholab::sas::core::modeling, class SerialManipulatorSimulatorFriendly : public DQ_SerialManipulator.
  • New src/serial_manipulator_simulator_friendly.cpp — ported from sas_robot_driver_gazebo src/M3_SerialManipulatorSimulatorFriendly.cpp.
  • CMakeLists.txt — added the new source to the marinholab_sas_core library.

Namespace adaptation

The original code was written inside namespace DQ_robotics, so dqrobotics' types and free functions (DQ, E_, Ad, vec8, hamiplus8, C8, …) were in scope for free. In the new namespace they're not, so:

  • the header pulls in the three types used in signatures (DQ, DQ_SerialManipulator, DQ_JointType) via scoped using-declarations;
  • the .cpp pulls in the free functions/constants it uses.

(Eigen types like MatrixXd/VectorXd need no using — the dqrobotics headers inject them into the global namespace. conj is resolved by ADL.)

Verification

Built locally on macOS against dqrobotics-from-source + Eigen, matching the macos-build.yml workflow:

  • Full marinholab_sas_core library + all examples compile; the new .cpp has zero warnings (-Wall -Wextra -Wpedantic).
  • All five example executables run clean.
  • Behavioral smoke test: for a 3-joint RX/RY/RZ model, raw_pose_jacobian agrees with the finite-difference derivative of raw_fkm to 4.6e-11, and default joint limits are ±10 rad. Confirms the migration is behaviorally identical, not just syntactic.

Notes / follow-ups

  • No new build dependency — dqrobotics is already a hard dependency of marinholab_sas_core.
  • This unblocks the next steps: the sas_py pybind11 bindings (bump submodules/sas_cpp to this commit) and the working-needlemanipulation rework to depend on marinholab-sas-core.
  • The sas_robot_driver_gazebo consumer switch is still blocked on D4 (how the apt sas_core package will ship the modeling header).

This PR was created by an AI agent (OpenHands) on behalf of @murilomarinho.

Co-authored-by: openhands openhands@all-hands.dev

…ab::sas::core::modeling

Introduce SerialManipulatorSimulatorFriendly, a serial-manipulator kinematics
model with configurable per-joint offsets and actuation types, in the
namespace marinholab::sas::core::modeling. Ported from
sas_robot_driver_gazebo (namespace DQ_robotics), where it lived as
M3_SerialManipulatorSimulatorFriendly; the class name drops the M3_ prefix.

dqrobotics types/functions are pulled into the namespace via scoped
using-declarations (the original relied on living inside namespace
DQ_robotics). Behavior is unchanged; the pose Jacobian agrees with the
finite-difference derivative of raw_fkm.

Co-authored-by: openhands <openhands@all-hands.dev>

@mmmarinho mmmarinho left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mmmarinho
mmmarinho merged commit 9926db9 into main Sep 23, 2026
9 checks passed
@mmmarinho
mmmarinho deleted the add-modeling-serial-manipulator branch September 23, 2026 11:05
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