You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I wrote the AgentClient code, I noticed some problems with the ConvertToRight function. the players' direction is stored in radians, but when the Referee system converts the court data to the yellow team data, 180 is used as the Pi, which leads to the confusion of the angle.So I hope to replace 180 with Pi to solve this problem.
Below is the source code of this function.(Program.cs: 614)
private static FiraMessage.RefToCli.Environment ConvertToRight(FiraMessage.RefToCli.Environment cliEnvironment)
{
return new FiraMessage.RefToCli.Environment
{
FoulInfo = cliEnvironment.FoulInfo,
Frame = new Frame
{
Ball = new FiraMessage.Ball
{
X = -cliEnvironment.Frame.Ball.X,
Y = -cliEnvironment.Frame.Ball.Y
},
RobotsBlue =
{
cliEnvironment.Frame.RobotsBlue.Select((robot, i) => new FiraMessage.Robot
{
RobotId = robot.RobotId,
X = -robot.X,
Y = -robot.Y,
Orientation = robot.Orientation > 0 ? robot.Orientation - 180 : robot.Orientation + 180
})
},
RobotsYellow =
{
cliEnvironment.Frame.RobotsYellow.Select((robot, i) => new FiraMessage.Robot
{
RobotId = robot.RobotId,
X = -robot.X,
Y = -robot.Y,
Orientation = robot.Orientation > 0 ? robot.Orientation - 180 : robot.Orientation + 180
})
}
}
};
}
The text was updated successfully, but these errors were encountered:
When I wrote the AgentClient code, I noticed some problems with the ConvertToRight function. the players' direction is stored in radians, but when the Referee system converts the court data to the yellow team data, 180 is used as the Pi, which leads to the confusion of the angle.So I hope to replace 180 with Pi to solve this problem.
Below is the source code of this function.(Program.cs: 614)
The text was updated successfully, but these errors were encountered: