Skip to content

RSDK-13546- compute jacobian from model table#17

Open
nfranczak wants to merge 20 commits into
mainfrom
20260420-RSDK-13546-Jacobian
Open

RSDK-13546- compute jacobian from model table#17
nfranczak wants to merge 20 commits into
mainfrom
20260420-RSDK-13546-Jacobian

Conversation

@nfranczak

@nfranczak nfranczak commented May 27, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@nfranczak nfranczak changed the title 20260420 rsdk 13546 jacobian RSDK-13546- compute jacobian from model table May 27, 2026
Comment thread src/viam/trajex/jacobian/jacobian.cpp
Comment thread src/viam/trajex/jacobian/jacobian.cpp
@nfranczak nfranczak marked this pull request as ready for review June 9, 2026 18:45
@nfranczak nfranczak requested a review from acmorrow June 9, 2026 20:32

@acmorrow acmorrow left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I left some general comments, but this needs to be reworked to avoid a dependency on the C++ SDK inside the totg library. We can't do that per our goal of using trajex by way of cgo inside the RDK.

Comment thread CMakeLists.txt Outdated
xtensor
xtl
PRIVATE
viam-cpp-sdk::viamsdk

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Unfortunately, creating this dependency edge is pretty much not permissible for viam-trajex-totg. It would mean dragging the C++ SDK and all of its transitive dependencies in when we link trajex into the RDK. Worse, for a static build, it would require producing a link line which explicitly referenced all of those libraries.

@@ -0,0 +1,450 @@
// Tests for the simplified jacobian module (Option B: plain-return API,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Try to teach your claude that it shouldn't reference ephemeral state of local information in code it produces. It is hard: it really likes to do this, but Option B doesn't mean anything.

// Joint-type encodings for column 9 of the model-table tensor.
// These match viam::sdk::JointType: revolute=0, continuous=1,
// prismatic=2, fixed=3.
constexpr double kRev = 0.0;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Style in our C++ is k_rev not kRev.


} // namespace

// ============================================================================

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You don't need these block comments. You can just comment on the BOOST_AUTO_TEST_SUITE itself, since that naturally forms a scope:

// The tests in this suite validate that `J * q_dot` produces the expected Cartesian velocity
BOOST_AUTO_TEST_SUITE(jacobian_velocity_tests)

Comment thread src/viam/trajex/jacobian/jacobian.hpp Outdated

namespace viam::trajex::jacobian {

// Compute the geometric Jacobian for a URDF-style model table at joint

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If this is in a header, it should be doxygen comment style, with ///. The parameters and return values should be tagged with the appropriate doxygen annotations. Have a look at the path.hpp or trajectory.hpp headers for examples. Probably good to tell claude that it should always follow the local commenting style and to study the codebase under development for the local patterns.

@nfranczak nfranczak requested a review from acmorrow June 11, 2026 21:12
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