Add actuator_moment Jacobian sparsity pattern to mjData.
PiperOrigin-RevId: 688124236 Change-Id: Ieccc8131d0046100ec9a2783ffb43dd784f0a63b
This commit is contained in:
committed by
Copybara-Service
parent
b00a7c6705
commit
36e8845599
@@ -261,6 +261,9 @@ struct mjData_ {
|
|||||||
|
|
||||||
// computed by mj_fwdPosition/mj_transmission
|
// computed by mj_fwdPosition/mj_transmission
|
||||||
mjtNum* actuator_length; // actuator lengths (nu x 1)
|
mjtNum* actuator_length; // actuator lengths (nu x 1)
|
||||||
|
int* moment_rownnz; // number of non-zeros in actuator_moment row (nu x 1)
|
||||||
|
int* moment_rowadr; // row start address in colind array (nu x 1)
|
||||||
|
int* moment_colind; // column indices in sparse Jacobian (nu x nv)
|
||||||
mjtNum* actuator_moment; // actuator moments (nu x nv)
|
mjtNum* actuator_moment; // actuator moments (nu x nv)
|
||||||
|
|
||||||
// computed by mj_fwdPosition/mj_crb
|
// computed by mj_fwdPosition/mj_crb
|
||||||
|
|||||||
@@ -289,6 +289,9 @@ struct mjData_ {
|
|||||||
|
|
||||||
// computed by mj_fwdPosition/mj_transmission
|
// computed by mj_fwdPosition/mj_transmission
|
||||||
mjtNum* actuator_length; // actuator lengths (nu x 1)
|
mjtNum* actuator_length; // actuator lengths (nu x 1)
|
||||||
|
int* moment_rownnz; // number of non-zeros in actuator_moment row (nu x 1)
|
||||||
|
int* moment_rowadr; // row start address in colind array (nu x 1)
|
||||||
|
int* moment_colind; // column indices in sparse Jacobian (nu x nv)
|
||||||
mjtNum* actuator_moment; // actuator moments (nu x nv)
|
mjtNum* actuator_moment; // actuator moments (nu x nv)
|
||||||
|
|
||||||
// computed by mj_fwdPosition/mj_crb
|
// computed by mj_fwdPosition/mj_crb
|
||||||
|
|||||||
@@ -623,6 +623,9 @@
|
|||||||
XMJV( int, wrap_obj, nwrap, 2 ) \
|
XMJV( int, wrap_obj, nwrap, 2 ) \
|
||||||
XMJV( mjtNum, wrap_xpos, nwrap, 6 ) \
|
XMJV( mjtNum, wrap_xpos, nwrap, 6 ) \
|
||||||
X ( mjtNum, actuator_length, nu, 1 ) \
|
X ( mjtNum, actuator_length, nu, 1 ) \
|
||||||
|
X ( int, moment_rownnz, nu, 1 ) \
|
||||||
|
X ( int, moment_rowadr, nu, 1 ) \
|
||||||
|
X ( int, moment_colind, nu, MJ_M(nv) ) \
|
||||||
X ( mjtNum, actuator_moment, nu, MJ_M(nv) ) \
|
X ( mjtNum, actuator_moment, nu, MJ_M(nv) ) \
|
||||||
X ( mjtNum, crb, nbody, 10 ) \
|
X ( mjtNum, crb, nbody, 10 ) \
|
||||||
X ( mjtNum, qM, nM, 1 ) \
|
X ( mjtNum, qM, nM, 1 ) \
|
||||||
|
|||||||
@@ -5144,6 +5144,30 @@ STRUCTS: Mapping[str, StructDecl] = dict([
|
|||||||
doc='actuator lengths',
|
doc='actuator lengths',
|
||||||
array_extent=('nu',),
|
array_extent=('nu',),
|
||||||
),
|
),
|
||||||
|
StructFieldDecl(
|
||||||
|
name='moment_rownnz',
|
||||||
|
type=PointerType(
|
||||||
|
inner_type=ValueType(name='int'),
|
||||||
|
),
|
||||||
|
doc='number of non-zeros in actuator_moment row',
|
||||||
|
array_extent=('nu',),
|
||||||
|
),
|
||||||
|
StructFieldDecl(
|
||||||
|
name='moment_rowadr',
|
||||||
|
type=PointerType(
|
||||||
|
inner_type=ValueType(name='int'),
|
||||||
|
),
|
||||||
|
doc='row start address in colind array',
|
||||||
|
array_extent=('nu',),
|
||||||
|
),
|
||||||
|
StructFieldDecl(
|
||||||
|
name='moment_colind',
|
||||||
|
type=PointerType(
|
||||||
|
inner_type=ValueType(name='int'),
|
||||||
|
),
|
||||||
|
doc='column indices in sparse Jacobian',
|
||||||
|
array_extent=('nu', 'nv'),
|
||||||
|
),
|
||||||
StructFieldDecl(
|
StructFieldDecl(
|
||||||
name='actuator_moment',
|
name='actuator_moment',
|
||||||
type=PointerType(
|
type=PointerType(
|
||||||
|
|||||||
@@ -4904,6 +4904,9 @@ public unsafe struct mjData_ {
|
|||||||
public int* wrap_obj;
|
public int* wrap_obj;
|
||||||
public double* wrap_xpos;
|
public double* wrap_xpos;
|
||||||
public double* actuator_length;
|
public double* actuator_length;
|
||||||
|
public int* moment_rownnz;
|
||||||
|
public int* moment_rowadr;
|
||||||
|
public int* moment_colind;
|
||||||
public double* actuator_moment;
|
public double* actuator_moment;
|
||||||
public double* crb;
|
public double* crb;
|
||||||
public double* qM;
|
public double* qM;
|
||||||
|
|||||||
Reference in New Issue
Block a user