mirror of
https://github.com/modelec/modelec-marcel-ROS.git
synced 2026-01-18 16:47:43 +01:00
test
This commit is contained in:
@@ -165,8 +165,8 @@ namespace Modelec
|
||||
double y_local = range * std::sin(angle) * 1000.0; // meters -> mm
|
||||
|
||||
// Rotate + translate into global frame
|
||||
double x_global = robot_x + (x_local * std::cos(robot_theta) - y_local * std::sin(robot_theta));
|
||||
double y_global = robot_y + (x_local * std::sin(robot_theta) + y_local * std::cos(robot_theta));
|
||||
double x_global = robot_x + (x_local * std::cos(robot_theta) + y_local * std::sin(robot_theta));
|
||||
double y_global = robot_y - (x_local * std::sin(robot_theta) - y_local * std::cos(robot_theta));
|
||||
|
||||
// Ignore points outside of the table
|
||||
if (x_global < 0 || x_global > map_width_ || y_global < 0 || y_global > map_height_)
|
||||
|
||||
Reference in New Issue
Block a user