Skip to content

Commit

Permalink
fix: use correct site rotation for laser scans
Browse files Browse the repository at this point in the history
the rotation matrix was accidentally transposed before multiplication.
  • Loading branch information
DavidPL1 authored Sep 19, 2024
1 parent 2cecaf8 commit 9da4ff1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mujoco_ros_laser/src/laser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ void processRay(const mjModel *model, mjData *data, std::mt19937 rand_generator,
{
mjtNum pos[3], target[3];
mju_copy(pos, laser_config.rays + 3 * ray_idx, 3);
mju_mulMatTVec3(target, rot, pos);
mju_mulMatVec3(target, rot, pos);

// start position
mju_copy(pos, data->site_xpos + 3 * laser_config.site_attached, 3);
Expand Down

0 comments on commit 9da4ff1

Please sign in to comment.