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

豊田高専練習試合用ブランチ #744

Open
wants to merge 55 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
4b84723
パススコアの描画
HansRobo Mar 5, 2025
c805830
launchの整理
HansRobo Mar 5, 2025
baea629
VS Codeの設定にスペルチェックの辞書を追加
HansRobo Mar 6, 2025
4582d7d
パススコアをGameAnalysisに追加
HansRobo Mar 6, 2025
f308e06
ペナルティエリア内のパススコアを0に
HansRobo Mar 6, 2025
b2411ce
チップキックボーナスは1mいない
HansRobo Mar 6, 2025
df6ab95
attackerで計算したpass scoreを使用
HansRobo Mar 6, 2025
625e5b9
emplace_robot_plannerで最大速度を設定できるようにする
HansRobo Mar 7, 2025
ef3d028
うるさいメッセージを削除
HansRobo Mar 7, 2025
d5aeec0
範囲内参照で実行時エラーするのでコメントアウト
HansRobo Mar 7, 2025
453259f
可視化が重たい
HansRobo Mar 7, 2025
4c4b6f2
実際に使ったやつ
HansRobo Mar 7, 2025
aa83d04
プレイスメント時の加速度を落とす代わりに最高速度を上げる
HansRobo Mar 7, 2025
29d6f84
プレイスメント時のドリブルパワーを落とす
HansRobo Mar 7, 2025
6cf877f
プレイスメント離脱の速度を上げる
HansRobo Mar 7, 2025
d00c340
プレイスメント終了の条件をルールに基づいて修正
HansRobo Mar 7, 2025
5903bc6
style(pre-commit): autofix
pre-commit-ci[bot] Mar 7, 2025
51c091e
プレイスメントでのGetContactBallスキルの使用を取りやめ
HansRobo Mar 7, 2025
d49f634
SingleBallPlacementStates::MOVE_TO_TARGETの速度調整
HansRobo Mar 7, 2025
21ee6c5
SingleBallPlacementStates::CONTACT_BALLの速度を下げる
HansRobo Mar 7, 2025
30534c8
SingleBallPlacementStates::CONTACT_BALLが早すぎるので遅くする
HansRobo Mar 7, 2025
78ce5b0
INPLAYでディフェンスを減らす
HansRobo Mar 7, 2025
0d1bc8f
コメントアウトの仕方が悪く、大量のメモリを消費してしまっていたのを修正
HansRobo Mar 7, 2025
4c62eec
rclcpp::TimeをRCL_ROS_TIMEを使用
HansRobo Mar 8, 2025
8176b14
SingleBallPlacementStates::MOVE_TO_TARGETでの角速度制限が強すぎる
HansRobo Mar 8, 2025
b095ce2
SingleBallPlacementStates::CONTACT_BALLの終了条件にボールセンサを組み込み
HansRobo Mar 8, 2025
88f4d47
launch修正
HansRobo Mar 8, 2025
831c732
修正
HansRobo Mar 8, 2025
41efea0
emplace_robot_plannerで最大速度を設定できるようにする
HansRobo Mar 7, 2025
3152a8a
範囲内参照で実行時エラーするのでコメントアウト
HansRobo Mar 7, 2025
70b8459
プレイスメント時の加速度を落とす代わりに最高速度を上げる
HansRobo Mar 7, 2025
52497f8
プレイスメント時のドリブルパワーを落とす
HansRobo Mar 7, 2025
8cb334b
プレイスメント離脱の速度を上げる
HansRobo Mar 7, 2025
1b3b8f1
プレイスメント終了の条件をルールに基づいて修正
HansRobo Mar 7, 2025
456e38d
style(pre-commit): autofix
pre-commit-ci[bot] Mar 7, 2025
c1f2174
プレイスメントでのGetContactBallスキルの使用を取りやめ
HansRobo Mar 7, 2025
4218676
SingleBallPlacementStates::MOVE_TO_TARGETの速度調整
HansRobo Mar 7, 2025
756bb79
SingleBallPlacementStates::CONTACT_BALLの速度を下げる
HansRobo Mar 7, 2025
cd8d09d
SingleBallPlacementStates::CONTACT_BALLが早すぎるので遅くする
HansRobo Mar 7, 2025
b64fdb5
rclcpp::TimeをRCL_ROS_TIMEを使用
HansRobo Mar 8, 2025
c2a9b9d
SingleBallPlacementStates::MOVE_TO_TARGETでの角速度制限が強すぎる
HansRobo Mar 8, 2025
1333223
SingleBallPlacementStates::CONTACT_BALLの終了条件にボールセンサを組み込み
HansRobo Mar 8, 2025
e087fb1
修正
HansRobo Mar 8, 2025
85e8189
GetBallContactスキルを削除
HansRobo Mar 8, 2025
4200d13
Merge remote-tracking branch 'origin/improve-ball-placement' into dddd
HansRobo Mar 8, 2025
bd0e56b
RVO2Plannerの不要なパラメータを削除
HansRobo Mar 8, 2025
9356030
RVO2Plannerでのプロファイルの値を出力
HansRobo Mar 8, 2025
488a877
ボール回り込みのときにボールの方向を向くように変更
HansRobo Mar 8, 2025
d5097e2
robot_receiver_nodeの自動再起動
HansRobo Mar 8, 2025
c23ba8a
速度向上
HansRobo Mar 9, 2025
a2cc08e
ボール方向を見るやつを調整
HansRobo Mar 9, 2025
f36751f
AttackerState::GOAL_FRONT_DANCE
HansRobo Mar 9, 2025
a316f16
StealBallをコメントアウト
HansRobo Mar 9, 2025
e5a1917
STOP時の距離を遠くする
HansRobo Mar 9, 2025
0aac6a6
AttackerState::GOAL_FRONT_DANCE修正
HansRobo Mar 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 133 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,137 @@
"chrono": "cpp",
"*.ipp": "cpp",
"functional": "cpp"
}
},
"cSpell.words": [
"grSim",
"robocup",
"robocupssl",
"teleop",
"inplay",
"matplotlibcpp",
"DPPS",
"consai",
"DBOOST",
"ZJUNlict",
"autoref",
"yellowteam",
"isteamyellow ",
"wheelsspeed",
"kickspeedx",
"kickspeedz",
"veltangent",
"velnormal",
"velangular",
"STRGREATER",
"bringup",
"gitflow",
"sint32",
"oneof",
"customwidget",
"customwidgets",
"Midlight",
"brushstyle",
"colorrole",
"statustip",
"Robotstatus",
"AIS",
"AMC",
"CMμs",
"ER-Force",
"erforce",
"ibis",
"ITAndroids",
"Immortals",
"KIKS",
"KgpKubs",
"MCT",
"Susano",
"Roboteam",
"MRL",
"NAELIC",
"NEUIslanders",
"OMID",
"OP-AmP",
"Parsian",
"RFC Cambridge",
"Ri-One",
"Ri-one",
"RoboDragons",
"RoboFEI",
"RoboIME",
"RoboJackets",
"Twente",
"RobôCin",
"SRC",
"SSH",
"STOx’s",
"Sysmic",
"TIGERs",
"Mannheim",
"Tritons",
"RCSC",
"Thunderbots",
"ULtron",
"UMass",
"Minutebots",
"URoboRus",
"Unknown",
"Warthog",
"ZJUNlict",
"luhbots",
"nAMeC",
"TRAPS",
"Shinobi",
"reRo",
"roboticserlangen",
"tigersmannheim",
"simulatorcli",
"sizepolicy",
"hsizetype",
"vsizetype",
"horstretch",
"verstretch",
"notr",
"rects",
"qcolor",
"frootspi",
"buttongroup",
"buttongroups",
"AUTOUIC",
"AUTORCC",
"FORCESTART",
"PETG",
"Waitables",
"zdixwfbhdipwhaaxtiqcxwywwkekaxog",
"callgrind",
"rowwise",
"colwise",
"MPPI",
"Kwargs",
"voicevox",
"FREEKICK",
"rcst",
"GLFW",
"GLEW",
"libglfw",
"libglew",
"opengl",
"imgui",
"Framebuffer",
"vsync",
"CHECKVERSION",
"BLAUE",
"Hackentrick",
"3rdparty",
"PROTOS",
"libprotobuf",
"RELWITHDEBINFO",
"NODEBUG",
"remmina",
"gltf",
"svgs",
"teleporting",
"DDPS",
"cooldown"
]
}
31 changes: 10 additions & 21 deletions crane_bringup/launch/crane.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,27 +47,22 @@ def generate_launch_description():
DeclareLaunchArgument(
"sim", default_value="true", description="シミュレータフラグ"
),
DeclareLaunchArgument(
"original_grsim",
default_value="false",
description="GrSimを使用する場合はtrueにする",
),
DeclareLaunchArgument(
"simple_ai", default_value="false", description="SimpleAIモードのフラグ"
),
DeclareLaunchArgument(
"max_vel", default_value="3.0", description="ロボットの最大速度"
"max_vel", default_value="7.0", description="ロボットの最大速度"
),
DeclareLaunchArgument(
"speak", default_value="true", description="音声ノードの起動フラグ"
"speak", default_value="false", description="音声ノードの起動フラグ"
),
DeclareLaunchArgument(
"is_emplace_positive_side",
default_value="true",
description="ロボットの退場する方向",
),
DeclareLaunchArgument(
"record", default_value="false", description="rosbag記録フラグ"
"record", default_value="true", description="rosbag記録フラグ"
),
Node(
package="crane_session_controller",
Expand Down Expand Up @@ -96,24 +91,17 @@ def generate_launch_description():
output="screen",
parameters=[
{"planner": "rvo2"},
{"p_gain": 5.0},
{"p_gain": 3.0},
{"i_gain": 0.00},
{"i_saturation": 0.00},
{"d_gain": 1.0},
{"max_vel": LaunchConfiguration("max_vel")},
{"max_acc": 3.0},
{"deceleration_factor": 1.5},
{"max_acc": 2.0},
{"deceleration_factor": 1.0},
{"rvo_radius": 0.15},
],
on_exit=default_exit_behavior,
),
Node(
package="crane_clock_publisher",
executable="crane_clock_publisher_node",
output="screen",
parameters=[{"time_scale": 1.00}],
on_exit=default_exit_behavior,
),
Node(
package="crane_sender",
# executable="simulation_protocol_sender_node",
Expand Down Expand Up @@ -149,7 +137,7 @@ def generate_launch_description():
{"i_saturation": 0.0},
{"d_gain": 4.0},
{"max_vel": LaunchConfiguration("max_vel")},
{"max_acc": 4.0},
{"max_acc": 2.5},
{"deceleration_factor": 1.5},
],
on_exit=default_exit_behavior,
Expand All @@ -159,9 +147,9 @@ def generate_launch_description():
executable="ibis_sender_node",
parameters=[
{"no_movement": False},
{"latency_ms": 0.0},
{"latency_ms": 100.0},
{"sim_mode": LaunchConfiguration("sim")},
{"kick_power_limit_straight": 0.30},
{"kick_power_limit_straight": 0.50},
{"kick_power_limit_chip": 1.0},
{
"use_simple_velocity": False
Expand Down Expand Up @@ -189,6 +177,7 @@ def generate_launch_description():
package="crane_robot_receiver",
executable="robot_receiver_node",
output="screen",
respawn=True,
# on_exit=default_exit_behavior,
),
Node(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class RVO2Planner : public LocalPlannerBase
public:
explicit RVO2Planner(rclcpp::Node & node);

void reflectWorldToRVOSim(const crane_msgs::msg::RobotCommands & msg);
void reflectWorldToRVOSim(crane_msgs::msg::RobotCommands & msg);

crane_msgs::msg::RobotCommands extractRobotCommandsFromRVOSim(
const crane_msgs::msg::RobotCommands & msg);
Expand All @@ -53,9 +53,7 @@ class RVO2Planner : public LocalPlannerBase
float RVO_RADIUS = 0.09f;
float RVO_MAX_SPEED = 10.0f;

float RVO_TRAPEZOIDAL_MAX_ACC = 8.0;
float RVO_TRAPEZOIDAL_FRAME_RATE = 60;
float RVO_TRAPEZOIDAL_MAX_SPEED = 4.0;

double MAX_VEL = 4.0;
double ACCELERATION = 4.0;
Expand Down
11 changes: 5 additions & 6 deletions crane_local_planner/src/rvo2_planner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,8 @@ RVO2Planner::RVO2Planner(rclcpp::Node & node)
RVO_RADIUS = node.get_parameter("rvo_radius").as_double();
node.declare_parameter("rvo_max_speed", RVO_MAX_SPEED);
RVO_MAX_SPEED = node.get_parameter("rvo_max_speed").as_double();
node.declare_parameter("rvo_trapezoidal_max_acc", RVO_TRAPEZOIDAL_MAX_ACC);
RVO_TRAPEZOIDAL_MAX_ACC = node.get_parameter("rvo_trapezoidal_max_acc").as_double();
node.declare_parameter("rvo_trapezoidal_frame_rate", RVO_TRAPEZOIDAL_FRAME_RATE);
RVO_TRAPEZOIDAL_FRAME_RATE = node.get_parameter("rvo_trapezoidal_frame_rate").as_double();
node.declare_parameter("rvo_trapezoidal_max_speed", RVO_TRAPEZOIDAL_MAX_SPEED);
RVO_TRAPEZOIDAL_MAX_SPEED = node.get_parameter("rvo_trapezoidal_max_speed").as_double();

node.declare_parameter("max_vel", MAX_VEL);
MAX_VEL = node.get_parameter("max_vel").as_double();
Expand All @@ -59,7 +55,7 @@ RVO2Planner::RVO2Planner(rclcpp::Node & node)
[this](const crane_msgs::msg::RobotFeedbackArray & msg) { latest_feedback = msg; });
}

void RVO2Planner::reflectWorldToRVOSim(const crane_msgs::msg::RobotCommands & msg)
void RVO2Planner::reflectWorldToRVOSim(crane_msgs::msg::RobotCommands & msg)
{
if (
world_model->getMsg().play_situation.command_raw.value ==
Expand All @@ -74,7 +70,7 @@ void RVO2Planner::reflectWorldToRVOSim(const crane_msgs::msg::RobotCommands & ms
}
}
// 味方ロボット:RVO内の位置・速度(=進みたい方向)の更新
for (const auto & command : msg.robot_commands) {
for (auto & command : msg.robot_commands) {
rvo_sim->setAgentPosition(
command.robot_id, RVO::Vector2(command.current_pose.x, command.current_pose.y));
rvo_sim->setAgentPrefVelocity(command.robot_id, RVO::Vector2(0.f, 0.f));
Expand Down Expand Up @@ -155,6 +151,9 @@ void RVO2Planner::reflectWorldToRVOSim(const crane_msgs::msg::RobotCommands & ms
max_vel = std::min(max_vel, 1.0);
}

command.local_planner_config.final_planned_max_acceleration = acceleration;
command.local_planner_config.final_planned_max_velocity = max_vel;

target_vel = target_vel.normalized() * max_vel;

if (target_vel.norm() < command.local_planner_config.terminal_velocity) {
Expand Down
1 change: 1 addition & 0 deletions crane_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ set(msg_files
"msg/analysis/Kick.msg"
"msg/analysis/Slack.msg"
"msg/analysis/SlackWithPoint.msg"
"msg/analysis/FloatWithID.msg"

"msg/planner/PassPlan.msg"
"msg/planner/PassInfo.msg"
Expand Down
2 changes: 2 additions & 0 deletions crane_msgs/msg/analysis/FloatWithID.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
uint8 id
float32 value
3 changes: 3 additions & 0 deletions crane_msgs/msg/analysis/GameAnalysis.msg
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ Slack[] our_slack
Slack[] their_slack

float32 ball_horizon

# sorted by score
FloatWithID[] pass_scores
3 changes: 3 additions & 0 deletions crane_msgs/msg/control/LocalPlannerConfig.msg
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ float32 terminal_velocity 0
uint8 priority 0

float32 theta_tolerance 0.0

float32 final_planned_max_acceleration -1.0
float32 final_planned_max_velocity -1.0
3 changes: 3 additions & 0 deletions crane_robot_skills/include/crane_robot_skills/attacker.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ enum class AttackerState {
THROUGH,
KICK_TO_GOAL,
STOP,
GOAL_FRONT_DANCE,
};
class Attacker : public SkillBaseWithState<AttackerState, RobotCommandWrapperPosition>
{
Expand All @@ -59,6 +60,8 @@ class Attacker : public SkillBaseWithState<AttackerState, RobotCommandWrapperPos
Receive receive_skill;

StealBall steal_ball_skill;

std::optional<Point> goal_front_dance_target = std::nullopt;
};
} // namespace crane::skills
#endif // CRANE_ROBOT_SKILLS__ATTACKER_HPP_
38 changes: 0 additions & 38 deletions crane_robot_skills/include/crane_robot_skills/get_ball_contact.hpp

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <crane_robot_skills/skill_base.hpp>
#include <memory>

#include "get_ball_contact.hpp"
#include "go_over_ball.hpp"
#include "move_with_ball.hpp"
#include "robot_command_as_skill.hpp"
Expand All @@ -38,8 +37,6 @@ class SingleBallPlacement
private:
std::shared_ptr<GoOverBall> go_over_ball;

std::shared_ptr<GetBallContact> get_ball_contact;

std::shared_ptr<MoveWithBall> move_with_ball;

std::shared_ptr<Sleep> sleep = nullptr;
Expand Down
1 change: 0 additions & 1 deletion crane_robot_skills/include/crane_robot_skills/skills.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <crane_robot_skills/ball_nearby_positioner.hpp>
#include <crane_robot_skills/emplace_robot.hpp>
#include <crane_robot_skills/freekick_saver.hpp>
#include <crane_robot_skills/get_ball_contact.hpp>
#include <crane_robot_skills/go_over_ball.hpp>
#include <crane_robot_skills/goal_kick.hpp>
#include <crane_robot_skills/goalie.hpp>
Expand Down
Loading