Skip to content

Commit

Permalink
Update custom ER-Force RobotSpecs (remove dribbler_height)
Browse files Browse the repository at this point in the history
  • Loading branch information
g3force committed May 8, 2021
1 parent 202987f commit 2302c37
Show file tree
Hide file tree
Showing 17 changed files with 47 additions and 71 deletions.
2 changes: 0 additions & 2 deletions config/robot-specs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ robot-specs:
vel_angular_max: 20
custom_erforce:
shoot_radius: 0.067
dribbler_height: 0.04
dribbler_width: 0.07
"ER-Force":
radius: 0.09
Expand All @@ -33,5 +32,4 @@ robot-specs:
vel_angular_max: 20
custom_erforce:
shoot_radius: 0.067
dribbler_height: 0.04
dribbler_width: 0.07
27 changes: 4 additions & 23 deletions generateProto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,8 @@ set -e
# Print commands
set -x

# common GC
protoc -I"./proto" -I"$GOPATH/src" --go_out="$GOPATH/src" proto/ssl_gc_common.proto
protoc -I"./proto" -I"$GOPATH/src" --go_out="$GOPATH/src" proto/ssl_gc_geometry.proto
# Update to latest protobuf compiler
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest

# vision
protoc -I"./proto" -I"$GOPATH/src" --go_out="$GOPATH/src" proto/ssl_vision_detection.proto
protoc -I"./proto" -I"$GOPATH/src" --go_out="$GOPATH/src" proto/ssl_vision_geometry.proto
protoc -I"./proto" -I"$GOPATH/src" --go_out="$GOPATH/src" proto/ssl_vision_wrapper.proto

# tracked vision
protoc -I"./proto" -I"$GOPATH/src" --go_out="$GOPATH/src" proto/ssl_vision_detection_tracked.proto
protoc -I"./proto" -I"$GOPATH/src" --go_out="$GOPATH/src" proto/ssl_vision_wrapper_tracked.proto

# game events
protoc -I"./proto" -I"$GOPATH/src" --go_out="$GOPATH/src" proto/ssl_gc_game_event.proto

# referee message
protoc -I"./proto" -I"$GOPATH/src" --go_out="$GOPATH/src" proto/ssl_gc_referee_message.proto

# simulation control
protoc -I"./proto" -I"$GOPATH/src" --go_out="$GOPATH/src" proto/ssl_simulation_custom_erforce_robot_spec.proto
protoc -I"./proto" -I"$GOPATH/src" --go_out="$GOPATH/src" proto/ssl_simulation_error.proto
protoc -I"./proto" -I"$GOPATH/src" --go_out="$GOPATH/src" proto/ssl_simulation_config.proto
protoc -I"./proto" -I"$GOPATH/src" --go_out="$GOPATH/src" proto/ssl_simulation_control.proto
# Generate all protobuf code
protoc -I"./proto" -I"$GOPATH/src" --go_out="$GOPATH/src" proto/*.proto
2 changes: 1 addition & 1 deletion internal/geom/ssl_gc_geometry.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/referee/ssl_gc_common.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/referee/ssl_gc_game_event.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/referee/ssl_gc_referee_message.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 4 additions & 6 deletions internal/simctl/handler_robot_specs.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ type Limits struct {
}

type CustomRobotSpecErForce struct {
ShootRadius float32 `yaml:"shoot_radius"`
DribblerHeight float32 `yaml:"dribbler_height"`
DribblerWidth float32 `yaml:"dribbler_width"`
ShootRadius float32 `yaml:"shoot_radius"`
DribblerWidth float32 `yaml:"dribbler_width"`
}

type RobotSpecHandler struct {
Expand Down Expand Up @@ -128,9 +127,8 @@ func mapRobotSpec(spec RobotSpec) (protoSpec *RobotSpecs) {
protoSpec.Limits = mapRobotLimits(spec.Limits)

customErForce := RobotSpecErForce{
ShootRadius: &spec.CustomErforce.ShootRadius,
DribblerHeight: &spec.CustomErforce.DribblerHeight,
DribblerWidth: &spec.CustomErforce.DribblerWidth,
ShootRadius: &spec.CustomErforce.ShootRadius,
DribblerWidth: &spec.CustomErforce.DribblerWidth,
}
customErForceSerialized, err := proto.Marshal(&customErForce)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion internal/simctl/ssl_simulation_config.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/simctl/ssl_simulation_control.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 14 additions & 25 deletions internal/simctl/ssl_simulation_custom_erforce_robot_spec.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/simctl/ssl_simulation_error.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/tracker/ssl_vision_detection_tracked.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/tracker/ssl_vision_wrapper_tracked.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/vision/ssl_vision_detection.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/vision/ssl_vision_geometry.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/vision/ssl_vision_wrapper.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 13 additions & 3 deletions proto/ssl_simulation_custom_erforce_robot_spec.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,19 @@ option go_package = "github.com/RoboCup-SSL/ssl-simulation-controller/internal/s
message RobotSpecErForce {
// The distance [m] from the robot center to the ball, when the ball is as close as possible to the robot.
// The ball may be a little bit inside the robot when looking from top, due to the dimensions of the dribbler.
required float shoot_radius = 1;
optional float shoot_radius = 1;
// The height of the dribbling bar from the ground [m]
required float dribbler_height = 2;
// required float dribbler_height = 2;

// Note for all teams: dribbler_height is not read at the moment, and so commented out and reserved.
// We as ER-Force think setting a different dribbler-hight (without beeing able to change
// max rpm or dribbler radius) will most likely result in
// A) A robot that cannot dribble the ball properly
// B) A robot that cannot shoot the ball properly
// C) A robot that might suck the ball on top of the mesh or
// D) A robot that might such the ball under the mesh and flip over.
// As none of those sound appealing, we disabled configuring the dribbler height for now.
reserved 2;
// The width of the dribbler itself (where the ball can be controlled), without the mechanical frame [m].
required float dribbler_width = 3;
optional float dribbler_width = 3;
}

0 comments on commit 2302c37

Please sign in to comment.