feat(modeling): add SerialManipulatorSimulatorFriendly under marinholab::sas::core::modeling - #8
Merged
Merged
Conversation
…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>
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
Adds
SerialManipulatorSimulatorFriendlyto themarinholab_sas_corelibrary under the new namespacemarinholab::sas::core::modeling.This is the C++ half of migrating
M3_SerialManipulatorSimulatorFriendlyout ofsas_robot_driver_gazebo(where it lived innamespace DQ_robotics). The class name drops theM3_prefix, per the plan.What changed
include/marinholab/sas/core/modeling/serial_manipulator_simulator_friendly.hpp—namespace marinholab::sas::core::modeling,class SerialManipulatorSimulatorFriendly : public DQ_SerialManipulator.src/serial_manipulator_simulator_friendly.cpp— ported fromsas_robot_driver_gazebosrc/M3_SerialManipulatorSimulatorFriendly.cpp.CMakeLists.txt— added the new source to themarinholab_sas_corelibrary.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:DQ,DQ_SerialManipulator,DQ_JointType) via scopedusing-declarations;.cpppulls in the free functions/constants it uses.(Eigen types like
MatrixXd/VectorXdneed nousing— the dqrobotics headers inject them into the global namespace.conjis resolved by ADL.)Verification
Built locally on macOS against dqrobotics-from-source + Eigen, matching the
macos-build.ymlworkflow:marinholab_sas_corelibrary + all examples compile; the new.cpphas zero warnings (-Wall -Wextra -Wpedantic).raw_pose_jacobianagrees with the finite-difference derivative ofraw_fkmto4.6e-11, and default joint limits are±10rad. Confirms the migration is behaviorally identical, not just syntactic.Notes / follow-ups
marinholab_sas_core.sas_pypybind11 bindings (bumpsubmodules/sas_cppto this commit) and theworking-needlemanipulationrework to depend onmarinholab-sas-core.sas_robot_driver_gazeboconsumer switch is still blocked on D4 (how the aptsas_corepackage will ship themodelingheader).This PR was created by an AI agent (OpenHands) on behalf of @murilomarinho.
Co-authored-by: openhands openhands@all-hands.dev