Skip to content

Commit 6529e8c

Browse files
fpatzeltDavidPL1
authored andcommitted
fix: skip user sensors in sensor plugin initialization
1 parent 16b9f54 commit 6529e8c

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Loading and reset times are reported in the server debug log. All plugin stats c
1212
### Fixed
1313
* Added missing call to render callbacks in viewer. While the callbacks were still being run for offscreen rendering, the viewer did not render additional geoms added by plugins.
1414
* *mujoco_ros_control*: fixed sometimes using wrong joint id in default hardware interface (would only be correct, if the joints appear first and in the same order in the compiled MuJoCo model).
15+
* *mujoco_ros_sensors*: now skipping user sensors, as they should be handled in separate, dedicated plugins.
1516

1617
### Changed
1718
* Moved `mujoco_ros::Viewer::Clock` definition to `mujoco_ros::Clock` (into common_types.h).

mujoco_ros_sensors/src/mujoco_sensor_handler_plugin.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,12 @@ void MujocoRosSensorsPlugin::initSensors(const mjModel *model, mjData *data)
444444
int parent_id = model->site_bodyid[site_id];
445445
int type = model->sensor_type[n];
446446

447+
// Skip user sensors because handling is unknown and should be done in extra plugin
448+
if (type == mjSENS_USER) {
449+
ROS_INFO_STREAM_NAMED("sensors", "Skipping USER sensor");
450+
continue;
451+
}
452+
447453
site = mj_id2name(const_cast<mjModel *>(model), model->sensor_objtype[n], site_id);
448454

449455
if (model->names[model->name_sensoradr[n]]) {

0 commit comments

Comments
 (0)