Skip to content
suitable pyglet version after any update is pyglet==1.5.16
pip install opencv-python==4.6.0.66
pip3 install empy==3.3.4
Orin AGX
I upgraded to CUDA 11.8 -
Then I built this fork of bitsandbytes -
Mentioned in this issue -

in protocol_pro.cpp
double gradual_adjust(double current_speed, double target_speed) { double ramp_rate = 0.1; // Adjust this rate to control how quickly the speed adjusts if (current_speed < target_speed) { return std::min(current_speed + ramp_rate, target_speed); } else if (current_speed > target_speed) { return std::max(current_speed - ramp_rate, target_speed); } return current_speed; // No change if already at target speed }
void ProProtocolObject::motors_control_loop(int sleeptime) { // Existing code setup... while (true) { std::this_thread::sleep_for(std::chrono::milliseconds(sleeptime));
// Lock and copy necessary variables from shared status robotstatus_mutex_.lock(); double desired_speed_left = calculate_desired_speed_left(); // Define this function double desired_speed_right = calculate_desired_speed_right(); // Define this function double current_speed_left = motors_speeds_[LEFT_MOTOR]; double current_speed_right = motors_speeds_[RIGHT_MOTOR]; robotstatus_mutex_.unlock();
// Gradually adjust speeds double new_speed_left = gradual_adjust(current_speed_left, desired_speed_left); double new_speed_right = gradual_adjust(current_speed_right, desired_speed_right);
// Lock and update motor speeds robotstatus_mutex_.lock(); motors_speeds_[LEFT_MOTOR] = new_speed_left; motors_speeds_[RIGHT_MOTOR] = new_speed_right; robotstatus_mutex_.unlock(); } }
double ProProtocolObject::calculate_desired_speed_left() { // Lock mutex to safely access shared command variables robotstatus_mutex_.lock(); double linear_vel = robotstatus_.cmd_linear_vel; // Commanded linear velocity double angular_vel = robotstatus_.cmd_angular_vel; // Commanded angular velocity robotstatus_mutex_.unlock();
// Calculate the left wheel speed based on differential drive kinematics double wheel_base = wheel2wheelDistance; // This should be set to the actual distance between the wheels double left_wheel_speed = linear_vel - (angular_vel * wheel_base / 2);
return left_wheel_speed; }
Want to print your doc?
This is not the way.
Try clicking the ··· in the right corner or using a keyboard shortcut (
CtrlP
) instead.