Skip to content
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
1 change: 1 addition & 0 deletions .cmake-format.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
parse:
additional_commands:
catkin_package:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
# based on https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml
name: Hydra-ROS Build and Test
on: {push: {branches: [main]}, pull_request: {branches: [main]}}
on: {push: {branches: [main, develop]}, pull_request: {branches: [main, develop]}}
jobs:
ros2:
runs-on: ubuntu-latest
Expand All @@ -19,7 +18,7 @@ jobs:
- name: Dependencies
run: |
apt update && apt install -y python3-vcstool git ccache
vcs import src < src/hydra_ros/install/packages.yaml
vcs import src < src/hydra_ros/install/ci/${{ github.base_ref || github.ref_name }}.yaml
rosdep update --rosdistro jazzy && rosdep install --rosdistro jazzy --from-paths src --ignore-src -r -y
- name: Build
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# based on https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml
name: Hydra-ROS Linting
name: Linting
on: {push: {branches: [main, develop]}, pull_request: {}}
jobs:
lint:
Expand Down
18 changes: 14 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
---
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
exclude: .*\.tsv|\.clang-format
exclude: .*\.tsv|\.clang-format|.*docker-compose.yml
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v14.0.6
rev: v21.1.8
hooks:
- id: clang-format
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.14
hooks:
- {id: ruff, args: [--select, I, --fix]}
- id: ruff
- id: ruff-format
- repo: https://github.com/lyz-code/yamlfix
rev: 1.19.1
hooks:
- id: yamlfix
entry: env YAMLFIX_LINE_LENGTH=200 yamlfix
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ echo "build: {cmake-args: [-DCMAKE_BUILD_TYPE=Release]}" > colcon_defaults.yaml

cd src
git clone git@github.com:MIT-SPARK/Hydra-ROS.git hydra_ros
vcs import . < hydra_ros/install/ros2.yaml
vcs import . < hydra_ros/install/packages.yaml
rosdep install --from-paths . --ignore-src -r -y

cd ..
Expand Down
8 changes: 0 additions & 8 deletions dev/check-code.sh

This file was deleted.

10 changes: 0 additions & 10 deletions dev/check-licenses.sh

This file was deleted.

73 changes: 0 additions & 73 deletions dev/check_license.py

This file was deleted.

34 changes: 0 additions & 34 deletions dev/cpp-header.txt

This file was deleted.

32 changes: 0 additions & 32 deletions dev/python-header.txt

This file was deleted.

11 changes: 0 additions & 11 deletions dev/reformat.sh

This file was deleted.

6 changes: 2 additions & 4 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ Before using Docker, make sure to:

cd src
git clone https://github.com/MIT-SPARK/Hydra-ROS.git hydra_ros

#replace ros2.yaml with ros2_docker.yaml to use https
vcs import . < hydra_ros/install/ros2.yaml
vcs import . < hydra_ros/install/packages.yaml
```

> :warning: **Warning**</br>
Expand Down Expand Up @@ -131,7 +129,7 @@ cd $WORKSPACE/src
git clone https://github.com/stereolabs/zed-ros2-wrapper.git
```

2. While the uhumans2 dataset has pre-segmented images, you must run semantic segmentation on the images. You can use [semantic_inference](https://github.com/MIT-SPARK/semantic_inference), which should already be installed via `ros2.yaml`. Download the default [pretrained model](https://drive.google.com/file/d/1XRcsyLSvqqhqNIaOI_vmqpUpmBT6gk9-/view?usp=drive_link) to the directory `$WORKSPACE/.models/`.
2. While the uhumans2 dataset has pre-segmented images, you must run semantic segmentation on the images. You can use [semantic_inference](https://github.com/MIT-SPARK/semantic_inference), which should already be installed via `packages.yaml`. Download the default [pretrained model](https://drive.google.com/file/d/1XRcsyLSvqqhqNIaOI_vmqpUpmBT6gk9-/view?usp=drive_link) to the directory `$WORKSPACE/.models/`.

3. (optional) To avoid re-optimizing the model when running the container, set the `ZED_CACHE` environment variable to mount a host directory for the zed cache:

Expand Down
7 changes: 4 additions & 3 deletions hydra_ros/app/csv_to_tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
import pathlib
import sys

import geometry_msgs.msg
import rclpy
import rclpy.node
import rclpy.utilities
import tf2_ros
import geometry_msgs.msg


DEFAULT_ORDER = ["x", "y", "z", "qw", "qx", "qy", "qz"]

Expand Down Expand Up @@ -58,7 +57,9 @@ class CsvToTf(rclpy.node.Node):
self._stale_threshold = rclpy.duration.Duration(seconds=stale_threshold_s)
lookahead_s = self._get_param("lookahead_s", 0.1).double_value
self._lookahead = rclpy.duration.Duration(seconds=lookahead_s)
self.get_logger().info(f"offset: {self._offset}, lookahead: {self._lookahead}, stale: {self._stale_threshold}")
self.get_logger().info(
f"offset: {self._offset}, lookahead: {self._lookahead}, stale: {self._stale_threshold}"
)

trajectory_file = self._get_param("trajectory_file", "").string_value
if trajectory_file == "":
Expand Down
4 changes: 3 additions & 1 deletion hydra_ros/app/dsg_republisher
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/usr/bin/env python3
"""Script that receives and republishes a dsg."""
import hydra_ros

import rclpy
from rclpy.node import Node

import hydra_ros


class DsgRepublishNode(Node):
"""Node to republish a DSG."""
Expand Down
3 changes: 1 addition & 2 deletions hydra_ros/app/noisy_tf_publisher
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

import numpy as np
import rclpy
from rclpy.node import Node

import tf2_ros
from geometry_msgs.msg import TransformStamped
from nav_msgs.msg import Odometry
from rclpy.node import Node
from scipy.spatial.transform import Rotation as R


Expand Down
6 changes: 3 additions & 3 deletions hydra_ros/app/odom_to_tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/usr/bin/env python3
"""Broadcast a tf from odom."""

import geometry_msgs.msg
import nav_msgs.msg
import rclpy
from rclpy.node import Node
import tf2_ros
import nav_msgs.msg
import geometry_msgs.msg
from rclpy.node import Node


class OdomToTf(Node):
Expand Down
1 change: 1 addition & 0 deletions hydra_ros/config/datasets/a1.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
map_frame: map
odom_frame: cam_t265_odom_frame
robot_frame: cam_d455_link
Expand Down
2 changes: 1 addition & 1 deletion hydra_ros/config/datasets/kitti_360.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ input:
min_range: $(arg sensor_min_range)
max_range: $(arg sensor_max_range)
is_asymmetric: true
horizontal_resolution: 0.16 # true resolution 0.08
horizontal_resolution: 0.16 # true resolution 0.08
vertical_resolution: 0.41875 # true resolution 0.41875
horizontal_fov: 360.0
vertical_fov: 26.8
Expand Down
1 change: 1 addition & 0 deletions hydra_ros/config/datasets/zed2i.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
map_frame: map
odom_frame: odom
robot_frame: zed_camera_link
Expand Down
1 change: 1 addition & 0 deletions hydra_ros/config/sinks/mesh_segmenter_sinks.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
sinks:
- type: ObjectVisualizer
Loading