Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into test_mil_poi
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrxyz committed Mar 6, 2024
2 parents 0278c2f + e58b169 commit 1bdc9e9
Show file tree
Hide file tree
Showing 103 changed files with 747 additions and 331 deletions.
20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/navigator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,6 @@ body:
attributes:
value: |
Hey, thanks for taking the time to add this software issue!
- type: input
id: assignee
attributes:
label: Assignee
description: >
Does this issue need to be completed by a specific person on the team?
If so, mention them below.
placeholder: ex. @torvalds is already working on this task!
validations:
required: false
- type: input
id: deadline
attributes:
label: Deadline
description: >
Does this task need a deadline? _If this task is related to a competition,
it should have a deadline._
placeholder: ex. 2023-12-25
validations:
required: false
- type: textarea
id: description
attributes:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
- name: Configure catkin workspace folder structure
run: |
mkdir -p $GITHUB_WORKSPACE/catkin_ws/src
sudo apt reinstall python3-pip
- name: Check out code from GitHub
uses: actions/[email protected]
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gh_pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

# Wait for the CI to finish so we can download the docs artifact
- name: Wait for CI
uses: lewagon/wait-on-check-action@v1.0.0
uses: lewagon/wait-on-check-action@v1.3.3
if: github.event.action != 'closed'
with:
ref: ${{ github.event.pull_request.head.ref }}
Expand Down
17 changes: 9 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ ci:

repos:
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.32.0
rev: v1.33.0
hooks:
- id: yamllint
- repo: https://github.com/psf/black
rev: 23.7.0
rev: 24.1.1
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v16.0.6
rev: v17.0.6
hooks:
- id: clang-format
- repo: https://github.com/PyCQA/autoflake
Expand All @@ -28,24 +28,24 @@ repos:
- id: autoflake
args: [--remove-all-unused-imports, --ignore-init-module-imports]
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.5
rev: v0.9.0.6
hooks:
- id: shellcheck
exclude: ^docker|deprecated|NaviGator/simulation/VRX
args: [--severity=warning, --exclude=SC1090]
- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.7.0-1
rev: v3.7.0-4
hooks:
- id: shfmt
exclude: ^docker|deprecated|NaviGator/simulation/VRX
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: 'v0.0.287'
rev: 'v0.2.0'
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
rev: v2.2.6
hooks:
- id: codespell
args:
Expand Down Expand Up @@ -73,11 +73,12 @@ repos:
- id: prettier-package-xml
- id: sort-package-xml
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
exclude_types: [markdown, rst]
- id: check-executables-have-shebangs
- id: check-symlinks
- id: check-json
Expand Down
2 changes: 1 addition & 1 deletion NaviGator/gnc/navigator_path_planner/nodes/path_planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,7 @@ def reevaluate_plan(self) -> None:
def action_check(self, _: rospy.timer.TimerEvent) -> None:
"""
Manages action preempting. Serves as the callback to a Timer operating
opereating every self.revisit_period seconds.
operating every self.revisit_period seconds.
"""
if self.preempted or not self.move_server.is_active():
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
The computer can also command a kill (for example, if ROS notices a criticaly low battery)
by sending the COMPUTER.KILL.REQUEST and undone with COMPUTER.CLEAR.REQUEST
"""

constants = {
"TIMEOUT_SECONDS": 8.0, # How often board must be pinged to not set HEARTBERAT_REMOTE True
# Note: not official documented, this is just a guess
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ def _check_voltage(self, msg):
if not self._raised or self._severity != severity:
self.broadcaster.raise_alarm(
severity=severity,
problem_description="battery critcaly low"
if severity == 2
else "battery low",
problem_description=(
"battery critcaly low" if severity == 2 else "battery low"
),
parameters={"voltage": voltage},
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ def check_continuity(self, odom):
self._raised = True # Avoid raising multiple times
rospy.logwarn("ODOM DISCONTINUITY DETECTED")
self.ab.raise_alarm(
problem_description="ODOM DISCONTINUITY DETECTED. JUMPED {} METERS".format(
jump,
),
problem_description=f"ODOM DISCONTINUITY DETECTED. JUMPED {jump} METERS",
severity=5,
)
self.last_position = position
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<param name="/is_vrx" type="bool" value="True" />

<include file="$(find navigator_launch)/launch/gnc/thruster_mapper.launch"/>
<include file="$(find navigator_launch)/launch/vrx/vrx_classifier.launch" />
<include file="$(find navigator_launch)/launch/vrx/vrx_tf.launch" />
<include file="$(find navigator_launch)/launch/vrx/vrx_localization.launch" />
<include file="$(find navigator_launch)/launch/vrx/vrx_upload_urdf.launch" />
Expand All @@ -30,5 +31,4 @@

<node if="$(arg run_task)" name="run_vrx_task" pkg="mil_missions" type="mission_client"
args="run Vrx" output="screen" />
<include file="$(find navigator_launch)/launch/vrx/vrx_classifier.launch" />
</launch>
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<launch>
<!-- Silent unnecessary TF warnings about missing joint states or missing transforms (cred: osrf/vrx#340)-->
<rosparam param="silent_tf_failure">true</rosparam>

<node pkg="robot_state_publisher" name="robot_state_publisher" type="robot_state_publisher">
<param name="use_tf_static" value="false" />
</node>
Expand All @@ -11,9 +14,10 @@
</rosparam>
</node>

<!--Publishes connection between wamv/imu_wamv_link and wamv/base_link. Same for wamv/gps_wamv_link.-->
<node pkg="tf2_ros" type="static_transform_publisher" name="imu_base_link_fix" args="0.3 -0.2 1.3 0 0 0 1 wamv/base_link wamv/imu_wamv_link" />
<node pkg="tf2_ros" type="static_transform_publisher" name="gps_base_link_fix" args="-0.85 0 1.3 0 0 1 wamv/base_link wamv/ins_link" />
<node pkg="tf2_ros" type="static_transform_publisher" name="base_link_enu_fix" args="0 0 0 0 0 0 1 enu wamv/base_link" />

<!--Publishes connection between wamv/imu_wamv_link and wamv/base_link. Same for wamv/gps_wamv_link.-->
<node pkg="tf2_ros" type="static_transform_publisher" name="imu_base_link_fix" args="0.3 -0.2 1.3 0 0 0 1 wamv/base_link wamv/imu_wamv_link" />
<node pkg="tf2_ros" type="static_transform_publisher" name="gps_base_link_fix" args="-0.85 0 1.3 0 0 1 wamv/base_link wamv/ins_link" />
<node pkg="tf2_ros" type="static_transform_publisher" name="base_link_enu_fix" args="0 0 0 0 0 0 1 enu wamv/base_link" />

</launch>
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,14 @@ dock_shape_1:
param: /mission/identify_dock/shape_1
options: [CIRCLE, TRIANGLE, CROSS, ANY]
description: >
The shape of the first bay to dock in during the dentify
The shape of the first bay to dock in during the identify
Symbols and Dock mission. If set to ANY, mission should dock based on the
color parameter and set this parameter during the mission
dock_color_1:
param: /mission/identify_dock/color_1
options: [RED, GREEN, BLUE, ANY]
description: >
The color of the first bay to dock in during the dentify Symbols and Dock
The color of the first bay to dock in during the identify Symbols and Dock
mission. If set to ANY, mission should dock based on the shape parameter
and set this parameter during the mission
Expand All @@ -174,7 +174,7 @@ dock_shape_2:
description: >
# yamllint disable-line rule:line-length
The shape of the second bay to dock in during the
dentify Symbols and Dock mission. If set to ANY,
identify Symbols and Dock mission. If set to ANY,
mission should dock based on the color parameter and set this
parameter during the mission
dock_color_2:
Expand All @@ -183,6 +183,6 @@ dock_color_2:
description: >
# yamllint disable-line rule:line-length
The color of the second bay to dock in during the
dentify Symbols and Dock mission.
identify Symbols and Dock mission.
If set to ANY, mission should dock based on the shape
parameter and set this parameter during the mission
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def decode_parameters(cls, parameters):
return parsed

async def run(self, args):
# Publish a velocity of zero for a while to stabalize navigator
# Publish a velocity of zero for a while to stabilize navigator
self.send_feedback("Switching trajectory to constant")
await self.change_trajectory("constant")
await self.nh.sleep(0.1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ async def run(self, parameters):
_, closest_reds = await self.get_sorted_objects("red_cylinder", 1)
_, closest_greens = await self.get_sorted_objects("green_cylinder", 1)

# Rename the totems for their symantic name
# Rename the totems for their semantic name
green_close = closest_greens[0]
red_close = closest_reds[0]

Expand All @@ -83,7 +83,7 @@ async def run(self, parameters):
_, closest_reds = await self.get_sorted_objects("red_cylinder", 2)
_, closest_greens = await self.get_sorted_objects("green_cylinder", 2)

# Rename the totems for their symantic name
# Rename the totems for their semantic name
green_far = closest_greens[1]
red_far = closest_reds[1]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,7 @@ async def do_circle():
await self.nh.sleep(0.25)
continue
fprint(
"Shape ({}found, using normal to look at other 3 shapes if needed".format(
res[0],
),
f"Shape ({res[0]}found, using normal to look at other 3 shapes if needed",
title="DETECT DELIVER",
msg_color="green",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ async def run(self, args):
"yl": "yaw_left",
"yr": "yaw_right",
}
command = command if command not in shorthand else shorthand[command]
command = shorthand.get(command, command)
movement = getattr(self.move, command)

trans_move = command[:3] != "yaw"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,7 @@ def as_MoveGoal(self, move_type=MoveGoal.DRIVE, **kwargs):
for key in kwargs:
if not hasattr(MoveGoal, key):
fprint(
"MoveGoal msg doesn't have a field called '{}' you tried to set via kwargs.".format(
key,
),
f"MoveGoal msg doesn't have a field called '{key}' you tried to set via kwargs.",
title="POSE_EDITOR",
msg_color="red",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ async def prepare_for_docking(self):
# This function looks at the two squares in front of the boat
# and it gets the middle pixel between the two squares.
# If the middle pixel is for some reason not in the middle of our camera...
# adjust the boat postiion before docking
# adjust the boat position before docking
print("prepare for landing!")

img = await self.front_left_camera_sub.get_next_message()
Expand Down
Loading

0 comments on commit 1bdc9e9

Please sign in to comment.