google-deepmind / google-deepmind/mujoco

mj_stepSkip made available to be used when including mujoco.h

Open
#1,453 2 comments 0 reactions 1 assignee Claimed by @yuvaltassa View on GitHub
enhancement
Dominant language
C++
Stars
15.2k
Forks
1.8k
Avg merge
10d 16h
Merged PRs (30d)
25

Description

Hello,

**Request**
I would like to use the function [mj_stepSkip](https://github.com/google-deepmind/mujoco/blob/03a8fa9ca90a8bed1c5bca34227465bde98e07f6/src/engine/engine_derivative_fd.c#L119) in my code but it is not available in mujoco.h currently.

**Reason**
I have written my own finite-differencing code as I have a use case where I can't use [mjd_transitionFD](https://github.com/google-deepmind/mujoco/blob/03a8fa9ca90a8bed1c5bca34227465bde98e07f6/src/engine/engine_derivative_fd.c#L305). But I want my finite-differencing code to be as fast as possible which requires this function. The reason I cant use mj_transitionFD is I am experimenting with code to dynamically change the state vector for my optimisation problems and so don't want to be computing the full A, B, C and D matrices for everything in the simulator.

**Additional thought**
I wonder if this would be a good feature to have in MuJoCo directly and I could implement it as a pull request if desired. I.e people who want to compute A, B, C, D matrices for a subset of their model. Particularly useful in high dimensional systems and performing manipulation in clutter.

The user could call mjd_transitionFD with an additional optional parameter perhaps. This additional parameter could be a list of elements that the user wants to consider in their state vector?

{joint1, joint2, joint4, body1_x, body1_y, body2_z, body2_yaw ... etc}

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.