Skip to content

Commit

Permalink
fix: skip user sensors in sensor plugin initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
fpatzelt committed Jan 18, 2024
1 parent ba0e777 commit e7321b8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mujoco_ros_sensors/src/mujoco_sensor_handler_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,10 @@ void MujocoRosSensorsPlugin::initSensors(const mjModel *model, mjData *data)
int site_id = model->sensor_objid[n];
int parent_id = model->site_bodyid[site_id];
int type = model->sensor_type[n];

if (type == mjSENS_USER) {
ROS_INFO_STREAM_NAMED("sensors", "Skipping USER sensor");
continue;
}
site = mj_id2name(const_cast<mjModel *>(model), model->sensor_objtype[n], site_id);

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

0 comments on commit e7321b8

Please sign in to comment.