Skip to content

Commit

Permalink
Fix mismatching names and package.xml corruption.
Browse files Browse the repository at this point in the history
  • Loading branch information
hemalshahNV committed Mar 1, 2021
1 parent 6e437ac commit 3fb864f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

cmake_minimum_required(VERSION 3.5)

project(nvapriltag_ros LANGUAGES CXX CUDA)
project(nvapriltags_ros2 LANGUAGES CXX CUDA)

set(CMAKE_CXX_STANDARD 14)
set(CUDA_MIN_VERSION "10.2")
Expand Down
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# NVAprilTags ROS2 Node

This ROS2 node uses the NVIDIA GPU-accelerated AprilTags library to detect AprilTags in images and publish their poses, ids, and additional metadata. This has been tested on ROS2 (Foxy) and should run on x86_64 and aarch64 (Jetson hardware). It is modeled after and comparable to the ROS2 node for CPU AprilTags detection here: https://github.com/christianrauch/apriltag_ros.git
This ROS2 node uses the NVIDIA GPU-accelerated AprilTags library to detect AprilTags in images and publish their poses, ids, and additional metadata. This has been tested on ROS2 (Foxy) and should build and run on x86_64 and aarch64 (Jetson). It is modeled after and comparable to the ROS2 node for CPU AprilTags detection here: https://github.com/christianrauch/apriltag_ros.git

For more information on the Isaac GEM this node is based off of, see the Isaac SDK 2020.2 documentation here: https://docs.nvidia.com/isaac/isaac/packages/fiducials/doc/apriltags.html

Expand Down Expand Up @@ -42,9 +42,17 @@ apriltag: # namespace
The parameters `family` and `size` are required. `family` (string) defines the tag family for the detector and can only be `36h11` at this time. `size` (float) is the tag edge size in meters, assuming square markers.

### Start
As any ROS2 package, check the repository out under `src/` in a ROS2 workspace and invoke `colcon build` appropriately to compile and prepare for use.

The launch file can be used to start a component manager and load the composable node with configuration:
```bash
ros2 launch nvapriltags_ros2 launch/tag_36h11.launch.py
ros2 launch nvapriltags_ros2 tag_36h11.launch.py
```
You need to run a camera node (e.g. from `v4l2_camera` package) to feed frames into the `nvapriltags_ros2` node for detection. For example, you can run the `v4l2_camera_node` and remap its output topics as follows:
```bash
ros2 run v4l2_camera v4l2_camera_node /camera_info:=/camera/camera_info /image_raw:=/camera/image
```
Tools such as `rqt` or other components can then consume the AprilTag detection messages from the `nvapriltags_ros2` node.

You will need to calibrate the intrinsics of your camera if you want the node to determine 3D poses for tags instead of just detection and corners as 2D pixel coordinates. See here: https://navigation.ros.org/tutorials/docs/camera_calibration.html
2 changes: 1 addition & 1 deletion launch/tag_36h11.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
def generate_launch_description():
composable_node = ComposableNode(
name='apriltag',
package='nvapriltag_ros', plugin='AprilTagNode',
package='nvapriltags_ros2', plugin='AprilTagNode',
remappings=[("/apriltag/image", "/camera/image"),
("/apriltag/camera_info", "/camera/camera_info")],
parameters=[cfg_36h11])
Expand Down
5 changes: 2 additions & 3 deletions package.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0"?>
<!--
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
Expand All @@ -7,11 +8,9 @@
# distribution of this software and related documentation without an express
# license agreement from NVIDIA CORPORATION is strictly prohibited.
-->

<?xml version="1.0"?>
<package format="2">
<name>nvapriltags_ros2</name>
<version>1.0.0</version>
<version>0.8.0</version>
<description>AprilTag Detection</description>
<maintainer email="[email protected]">nvidia</maintainer>
<license>MIT</license>
Expand Down

0 comments on commit 3fb864f

Please sign in to comment.