Skip to content

Commit

Permalink
pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
b1n-ch1kn committed Jan 30, 2025
1 parent dda7380 commit 085ef54
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ void VelocityController::controller_callback() {
RCLCPP_INFO_ONCE(this->get_logger(), "Motors not enabled, awaiting State::DRIVING");
return;
}
RCLCPP_INFO(this->get_logger(),
"Motors enabled, Received target and current velocities\n - Starting control loop");
RCLCPP_INFO(this->get_logger(), "Motors enabled, Received target and current velocities\n - Starting control loop");

float accel = 0;
if (state_->mission != driverless_msgs::msg::AVStateStamped::INSPECTION) {
Expand Down
2 changes: 1 addition & 1 deletion src/navigation/planners/planners/node_ft_planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ def planning_callback(self):
# self.map_pub.publish(self.current_map)
# self.map_meta_pub.publish(self.current_map.info)

# convert current time to nanosecs
# convert current time to nanosecs
stamp_float = time.time()
self.diagnostic_pub.tick(stamp_float)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ def __init__(self):

def av_state_callback(self, msg: AVStateStamped):
super().av_state_callback(msg)
if msg.state == AVStateStamped.DRIVING and not self.mission_started and msg.mission == AVStateStamped.INSPECTION:
if (
msg.state == AVStateStamped.DRIVING
and not self.mission_started
and msg.mission == AVStateStamped.INSPECTION
):
time.sleep(1)
self.mission_started = True
self.start_time = time.time()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class VehicleSupervisor(Node):
ros_state = ROSStateStamped()
av_state = AVStateStamped()

timeout = 1.0 # seconds
timeout = 1.0 # seconds
lidar_update_time = time.time()
planning_update_time = time.time()
sbg_update_time = time.time()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class VehicleSupervisor(Node):
ros_state = ROSStateStamped()
av_state = AVStateStamped()

timeout = 1.0 # seconds
timeout = 1.0 # seconds
lidar_update_time = time.time()
planning_update_time = time.time()
sbg_update_time = time.time()
Expand Down Expand Up @@ -124,11 +124,7 @@ def timer_callback(self):
self.system_started = self.send_system_request(True)

# start mission if in autonomous mode and mission is not none
if (
self.system_started
and self.av_state.mission != AVStateStamped.MISSION_NONE
and not self.mission_launched
):
if self.system_started and self.av_state.mission != AVStateStamped.MISSION_NONE and not self.mission_launched:
target_mission = INT_MISSION_TYPE[self.av_state.mission].value
self.get_logger().info("Mission started: " + target_mission)
self.mission_launched = self.send_mission_request(self.av_state.mission, True)
Expand Down

0 comments on commit 085ef54

Please sign in to comment.