Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions ateam_msgs/msg/RobotMotionCommand.msg
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ float64 limit_vel_angular # (rad/s)
float64 limit_acc_linear # (m/s/s)
float64 limit_acc_angular # (rad/s/s)

# pivot maneuver parameters (used when body_control_mode == BCM_PIVOT)
float64 pivot_orbit_radius # (m)
float64 pivot_heading_lag # (rad)

uint8 kick_request
float32 kick_speed # (m/s)
float32 dribbler_speed # (rpm)
Expand All @@ -28,3 +32,4 @@ uint8 BCM_GLOBAL_VELOCITY = 2
uint8 BCM_LOCAL_VELOCITY = 3
uint8 BCM_GLOBAL_ACCEL = 4
uint8 BCM_LOCAL_ACCEL = 5
uint8 BCM_PIVOT = 6
12 changes: 12 additions & 0 deletions radio/ateam_radio_bridge/src/radio_bridge_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,18 @@ class RadioBridgeNode : public rclcpp::Node
static_cast<float>(command.acceleration.theta),
};
break;
case ateam_msgs::msg::RobotMotionCommand::BCM_PIVOT:
control_msg.body_control_mode = BCM_PIVOT;
control_msg.cmd.pivot = {
static_cast<float>(command.pose.x),
static_cast<float>(command.pose.y),
static_cast<float>(command.pose.theta),
static_cast<float>(command.limit_vel_angular),
static_cast<float>(command.limit_acc_angular),
static_cast<float>(command.pivot_orbit_radius),
static_cast<float>(command.pivot_heading_lag)
};
break;
default:
RCLCPP_WARN(get_logger(), "Unknown body control mode: %d", command.body_control_mode);
control_msg.body_control_mode = BCM_OFF;
Expand Down
1 change: 1 addition & 0 deletions radio/ateam_radio_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ set(RADIO_STRUCTS_TO_GENERATE
LocalVelocityCommand
GlobalAccelerationCommand
LocalAccelerationCommand
PivotCommand
BasicTelemetry
ErrorTelemetry
ExtendedTelemetry
Expand Down
Loading