Expose mj_printSparsity in engine_print.h.

This is useful for debugging sparse operations.

PiperOrigin-RevId: 711765082
Change-Id: I532a5218da0f921dd4b04730d0b12c5136e7ca65
This commit is contained in:
Yuval Tassa
2025-01-03 08:50:48 -08:00
committed by Copybara-Service
parent 923f75fd23
commit 63e2836f63
2 changed files with 25 additions and 18 deletions
+6
View File
@@ -15,6 +15,8 @@
#ifndef MUJOCO_SRC_ENGINE_ENGINE_PRINT_H_
#define MUJOCO_SRC_ENGINE_ENGINE_PRINT_H_
#include <stdio.h>
#include <mujoco/mjdata.h>
#include <mujoco/mjexport.h>
#include <mujoco/mjmodel.h>
@@ -40,6 +42,10 @@ MJAPI void mj_printFormattedData(const mjModel* m, mjData* d, const char* filena
// print data to text file
MJAPI void mj_printData(const mjModel* m, mjData* d, const char* filename);
// print sparse matrix structure
MJAPI void mj_printSparsity(const char* str, int nr, int nc, const int* rowadr, const int* diag,
const int* rownnz, const int* rowsuper, const int* colind, FILE* fp);
#ifdef __cplusplus
}
#endif