Skip to content

Commit

Permalink
fix(simple_planning_simulator): fix bug in function to apply noise (t…
Browse files Browse the repository at this point in the history
…ier4#665)

Signed-off-by: satoshi-ota <[email protected]>
  • Loading branch information
satoshi-ota authored and boyali committed Oct 3, 2022
1 parent 0a67c57 commit f67c7ac
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ void SimplePlanningSimulator::add_measurement_noise(
odom.pose.pose.position.x += (*n.pos_dist_)(*n.rand_engine_);
odom.pose.pose.position.y += (*n.pos_dist_)(*n.rand_engine_);
const auto velocity_noise = (*n.vel_dist_)(*n.rand_engine_);
odom.twist.twist.linear.x = velocity_noise;
odom.twist.twist.linear.x += velocity_noise;
float32_t yaw = motion::motion_common::to_angle(odom.pose.pose.orientation);
yaw += static_cast<float>((*n.rpy_dist_)(*n.rand_engine_));
odom.pose.pose.orientation = motion::motion_common::from_angle(yaw);
Expand Down

0 comments on commit f67c7ac

Please sign in to comment.