Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add python checks to pre-commit #9

Merged
merged 3 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,16 @@ repos:
rev: v14.0.0
hooks:
- id: clang-format
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
- repo: https://github.com/ahans/cmake-format-precommit
rev: 8e52fb6506f169dddfaa87f88600d765fca48386
hooks:
- id: cmake-format
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]
3 changes: 1 addition & 2 deletions ros/launch/offline_node.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
import launch
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch.actions import OpaqueFunction
from launch.actions import DeclareLaunchArgument, OpaqueFunction
from launch.conditions import IfCondition
from launch.launch_description_sources import (
get_launch_description_from_python_launch_file,
)
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import Node
from launch.actions import DeclareLaunchArgument


def _generate_launch_description(context: launch.LaunchContext, *args, **kwargs):
Expand Down
7 changes: 5 additions & 2 deletions ros/launch/online_node.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@


def generate_launch_description():
use_sim_time = LaunchConfiguration("use_sim_time", default=(os.getenv("SIMULATION") == "true"))
use_sim_time = LaunchConfiguration(
"use_sim_time", default=(os.getenv("SIMULATION") == "true")
)
tf_timeout = LaunchConfiguration(
"tf_timeout",
default=PythonExpression(["'0.1' if ", use_sim_time, " else '0.0'"]),
Expand All @@ -31,7 +33,8 @@ def generate_launch_description():
],
parameters=[
# KISS-ICP configuration
get_package_share_directory("kinematic_icp") + "/config/kinematic_icp_ros.yaml",
get_package_share_directory("kinematic_icp")
+ "/config/kinematic_icp_ros.yaml",
{
# Input topic, is not a remap to marry API with offline node
"input": LaunchConfiguration("lidar_topic"),
Expand Down
Loading