Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move_to_gate_actionで、goal地点を計算した際の姿勢の演算結果が/move_base_simple/goalの表示と違う #81

Open
sarubito opened this issue Sep 18, 2022 · 4 comments

Comments

@sarubito
Copy link
Contributor

No description provided.

@sarubito
Copy link
Contributor Author

  1. action_node.hppのbetween関数の252行目と253行目の間に以下を追記
RCLCPP_INFO(get_logger(), "debug x : [%f]", v.x);
RCLCPP_INFO(get_logger(), "debug y : [%f]", v.y);

もしくは、259行目以下の条件文を以下のように変更した

if ((v.y * v_robot.x - v.x * v_robot.y) >= (-v.y * v_robot.x + v.x * v_robot.y)) {
      goal_rpy.z = std::atan2(-v.x, v.y);
      RCLCPP_INFO(get_logger(), "debug x : [%f]", goal_rpy.z);
    } else {
      goal_rpy.z = std::atan2(v.x, -v.y);
      RCLCPP_INFO(get_logger(), "debug y : [%f]", goal_rpy.z);
    }
  1. ros2 launch navi_sim with_planner.launch.py behavior_config_filepath:=config/move_to_gate.yamlを実行
    252行目以下に追記する場合と259行目以下の条件文を変更する場合の2つのパターンどちらもバグが直る。

@sarubito
Copy link
Contributor Author

バグの様子
Screenshot from 2022-09-18 00-27-21

@hakuturu583
Copy link
Member

かなり不可解ですね、/move_base_simple/goalトピックを出しているノードは複数あるはずなので、そのうちどれが奇妙な出力をだしているか確認する必要があるかもしれません。

@hakuturu583
Copy link
Member

なんだかこれ、90度ずれていますね

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants