Skip to content

Commit

Permalink
next suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
rafal-gorecki committed Jan 30, 2024
1 parent def4058 commit aed31da
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions rosbot_gazebo/test/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ def wait_for_initialization(node: SimulationTestNode, robot_name="ROSbot"):

def x_speed_test(node: SimulationTestNode, v_x=0.0, v_y=0.0, v_yaw=0.0, robot_name="ROSbot"):
node.set_destination_speed(v_x, v_y, v_yaw)
# node.rate.sleep()
assert node.vel_stabilization_time_event.wait(20.0), (
f"{robot_name}: The simulation is running slowly or has crashed! The time elapsed"
" since setting the target speed is:"
Expand Down Expand Up @@ -277,18 +276,18 @@ def sensors_readings_test(node: SimulationTestNode, robot_name="ROSbot"):

def diff_test(node: SimulationTestNode, robot_name="ROSbot"):
wait_for_initialization(node, robot_name)
# 0.8 m/s and 3.14 rad/s are controller's limits defined in
# 0.9 m/s and 3.0 rad/s are controller's limits defined in
# rosbot_controller/config/mecanum_drive_controller.yaml
x_speed_test(node, v_x=0.8, robot_name=robot_name)
yaw_speed_test(node, v_yaw=3.14, robot_name=robot_name)
x_speed_test(node, v_x=0.9, robot_name=robot_name)
yaw_speed_test(node, v_yaw=3.0, robot_name=robot_name)
sensors_readings_test(node, robot_name)


def mecanum_test(node: SimulationTestNode, robot_name="ROSbot"):
wait_for_initialization(node, robot_name)
# 0.8 m/s and 3.14 rad/s are controller's limits defined in
# 0.9 m/s and 3.0 rad/s are controller's limits defined in
# rosbot_controller/config/mecanum_drive_controller.yaml
x_speed_test(node, v_x=0.8, robot_name=robot_name)
y_speed_test(node, v_y=0.8, robot_name=robot_name)
yaw_speed_test(node, v_yaw=3.14, robot_name=robot_name)
x_speed_test(node, v_x=0.9, robot_name=robot_name)
y_speed_test(node, v_y=0.9, robot_name=robot_name)
yaw_speed_test(node, v_yaw=3.0, robot_name=robot_name)
sensors_readings_test(node, robot_name)

0 comments on commit aed31da

Please sign in to comment.