123
This commit is contained in:
@@ -82,8 +82,8 @@ void output_control_data(const cv::Point2f* ballistic_point,
|
|||||||
|
|
||||||
// Convert PID outputs to the expected format
|
// Convert PID outputs to the expected format
|
||||||
// The PID output might be large, so we might need to scale it
|
// The PID output might be large, so we might need to scale it
|
||||||
int ballistic_offset_yaw = 1.9*-static_cast<int>(pid_yaw_output);
|
int ballistic_offset_yaw = 1.9 * (-static_cast<int>(pid_yaw_output));
|
||||||
int ballistic_offset_pitch = 1.9*-static_cast<int>(pid_pitch_output);
|
int ballistic_offset_pitch = 1.9 * (-static_cast<int>(pid_pitch_output));
|
||||||
|
|
||||||
// Apply same limits as before
|
// Apply same limits as before
|
||||||
if (abs(ballistic_offset_yaw) > 320) {
|
if (abs(ballistic_offset_yaw) > 320) {
|
||||||
@@ -127,7 +127,7 @@ int main(int /*argc*/, char* /*argv*/[]) {
|
|||||||
std::string target_color = "red";
|
std::string target_color = "red";
|
||||||
int cam_id = 0;
|
int cam_id = 0;
|
||||||
cv::Size default_resolution(1280, 720); // Changed to 640x480 for consistency with SJTU project
|
cv::Size default_resolution(1280, 720); // Changed to 640x480 for consistency with SJTU project
|
||||||
bool use_ttl = false; // Set to false to disable TTL communication
|
bool use_ttl = true; // Set to false to disable TTL communication
|
||||||
|
|
||||||
|
|
||||||
if (Numbe == 0) {
|
if (Numbe == 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user