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

Sync More-Graph-Changes with main #300

Merged
merged 1 commit into from
Oct 21, 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
13 changes: 7 additions & 6 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
{
"name": "UMN Lunabotics",
"image": "umnrobotics/isaac_ros",
"image": "umnrobotics/devcontainer",
"runArgs": [
"--privileged",
"--network",
Expand All @@ -12,12 +12,12 @@
"DISPLAY": "${localEnv:DISPLAY}",
"NVIDIA_VISIBLE_DEVICES": "all",
"NVIDIA_DRIVER_CAPABILITIES": "all",
"FASTFASTRTPS_DEFAULT_PROFILES_FILE": "/usr/local/share/middleware_profiles/rtps_udp_profile.xml",
"FASTFASTRTPS_DEFAULT_PROFILES_FILE": "/usr/local/share/middleware_profiles/rtps_udp_profile.xml"
// "ROS_DOMAIN_ID": "${localEnv:ROS_DOMAIN_ID}"
},
"initializeCommand": "git config --global --add safe.directory /workspaces/Lunabotics && git reset --soft && git submodule update --init --recursive && git config --global submodule.recurse true && git pull || true",
"postCreateCommand": "echo 'source /opt/ros/humble/setup.bash' >> ~/.bashrc && echo 'source /workspaces/Lunabotics/install/setup.bash' >> ~/.bashrc",
"postStartCommand": "sudo apt-get update && rosdep update && rosdep install -i --from-path src --rosdistro $ROS_DISTRO -y --skip-keys 'nvblox' --skip-keys 'draco_point_cloud_transport' --skip-keys 'point_cloud_transport_plugins' --skip-keys 'ffmpeg_encoder_decoder' --skip-keys 'ffmpeg_image_transport'",
"initializeCommand": "git config --global --add safe.directory '*' && git reset --soft && git submodule update --init --recursive && git config --global submodule.recurse true && git pull || true",
"postCreateCommand": "echo 'source /opt/ros/humble/setup.bash' >> ~/.bashrc && echo 'source /workspaces/Lunabotics/install/setup.bash' >> ~/.bashrc && sudo apt-get update && sudo apt install git-lfs",
"postStartCommand": "rosdep update && rosdep install -i --from-path src --rosdistro $ROS_DISTRO -y --skip-keys 'nvblox negotiated draco_point_cloud_transport point_cloud_transport_plugins ffmpeg_encoder_decoder ffmpeg_image_transport isaac_ros_peoplesemseg_models_install isaac_ros_h264_decoder isaac_ros_unet isaac_ros_triton isaac_ros_dnn_image_encoder nova_carter_navigation'",
// "mounts": [
// "type=bind,source=/tmp/.X11-unix,target=/tmp/.X11-unix",
// "type=bind,source=${localEnv:HOME}/.Xauthority,target=/home/admin/.Xauthority",
Expand All @@ -39,7 +39,8 @@
"ms-python.isort",
"charliermarsh.ruff@prerelease",
"wayou.vscode-todo-highlight",
"ms-iot.vscode-ros@prerelease"
"ms-iot.vscode-ros@prerelease",
"ms-azuretools.vscode-docker"
],
"settings": {
"git.autofetch": true,
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@ CATKIN_IGNORE

.fake

docker/deepstream
16 changes: 8 additions & 8 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,28 @@
branch = humble-v4.1.4
[submodule "src/isaac_ros/isaac_ros_common"]
path = src/isaac_ros/isaac_ros_common
url = https://github.com/GOFIRST-Robotics/isaac_ros_common.git
branch = main
url = https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_common.git
branch = v3.1.0
[submodule "src/isaac_ros/isaac_ros_nvblox"]
path = src/isaac_ros/isaac_ros_nvblox
url = https://github.com/GOFIRST-Robotics/isaac_ros_nvblox.git
branch = main
url = https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_nvblox.git
branch = v3.1.0
[submodule "src/isaac_ros/isaac_ros_apriltag"]
path = src/isaac_ros/isaac_ros_apriltag
url = https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_apriltag.git
branch = main
branch = v3.1.0
[submodule "src/isaac_ros/isaac_ros_image_pipeline"]
path = src/isaac_ros/isaac_ros_image_pipeline
url = https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_image_pipeline.git
branch = main
branch = v3.1.0
[submodule "src/isaac_ros/isaac_ros_nitros"]
path = src/isaac_ros/isaac_ros_nitros
url = https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_nitros.git
branch = main
branch = v3.1.0
[submodule "src/isaac_ros/isaac_ros_visual_slam"]
path = src/isaac_ros/isaac_ros_visual_slam
url = https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_visual_slam.git
branch = main
branch = v3.1.0
[submodule "src/realsense-ros"]
path = src/realsense-ros
url = https://github.com/IntelRealSense/realsense-ros.git
Expand Down
80 changes: 30 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ graph LR
## How to Run Inside Docker Container

<details>
<summary>How to Run Inside the Dev Container On Windows/Mac</summary>
<summary>How to Run Inside the Dev Container on Windows/Mac</summary>
<br>
Open vscode and install the "Dev Containers" extension. Then, with vscode open, press ctrl+shift+p to open the vscode command palette and type "Clone Repository in Container Volume". Select the "Dev Containers: Clone Repository in Container Volume" option, then select "Clone a repository from GitHub in a Container Volume". Search for and select our Lunabotics repository (the repository named "Lunabotics"). If you are cloning the repository directly into the container volume, you do NOT need to clone the repo locally, it will be automatically cloned into the repo.
<br><br>
Expand All @@ -63,84 +63,64 @@ Build No GPU Tasks
Optionally, traditional "colcon build" commands can be run in the vscode terminal instead of using the Command Palette commands above.
</details>
<details>
<summary>Updating Dev Container For Windows/Mac</summary>
<summary>Updating the Dev Container for Windows/Mac</summary>
<br>
If you ever need to rebuild the remote container image, first update the x86_64 and aarch64 images:

```
cd ~/Lunabotics/src/isaac_ros/isaac_ros_common/docker
docker build --build-arg="BASE_IMAGE=osrf/ros:humble-desktop" -f Dockerfile.user -t umnrobotics/devcontainer:x86_64.user .
cd ~/Lunabotics/docker
docker build --build-arg="BASE_IMAGE=umnrobotics/devcontainer:x86_64.user" -f Dockerfile.umn -t umnrobotics/devcontainer:x86_64.user.umn .
docker push umnrobotics/devcontainer:x86_64.user.umn

docker build --build-arg="BASE_IMAGE=nvcr.io/nvidia/isaac/ros:x86_64-ros2_humble_bcf535ea3b9d16a854aaeb1701ab5a86" -f Dockerfile.user -t umnrobotics/isaac_ros:x86_64.ros2_humble.user .
docker build --build-arg="BASE_IMAGE=umnrobotics/isaac_ros:x86_64.ros2_humble.user" -f Dockerfile.umn -t umnrobotics/isaac_ros:x86_64.ros2_humble.user.umn .
docker push umnrobotics/isaac_ros:x86_64.ros2_humble.user.umn

docker build --build-arg="BASE_IMAGE=nvcr.io/nvidia/isaac/ros:aarch64-ros2_humble_b7e1ed6c02a6fa3c1c7392479291c035" -f Dockerfile.user -t umnrobotics/isaac_ros:arm64.ros2_humble.user --platform "arm64" .
docker build --build-arg="BASE_IMAGE=umnrobotics/isaac_ros:arm64.ros2_humble.user" -f Dockerfile.umn -t umnrobotics/isaac_ros:arm64.ros2_humble.user.umn --platform "arm64" .
docker push umnrobotics/isaac_ros:arm64.ros2_humble.user.umn
cd ~/Lunabotics/src/isaac_ros/isaac_ros_common/docker
docker build --build-arg="BASE_IMAGE=arm64v8/ros:humble" -f Dockerfile.user -t umnrobotics/devcontainer:arm64.user .
cd ~/Lunabotics/docker
docker build --build-arg="BASE_IMAGE=umnrobotics/devcontainer:arm64.user" -f Dockerfile.umn -t umnrobotics/devcontainer:arm64.user.umn .
docker push umnrobotics/devcontainer:arm64.user.umn
```

Then, run the following command with the devcontainer cli installed:
```
docker pull umnrobotics/isaac_ros:x86_64.ros2_humble.user.umn
docker pull umnrobotics/isaac_ros:arm64.ros2_humble.user.umn --platform "arm64"
cd ~/Lunabotics
docker pull umnrobotics/devcontainer:x86_64.user.umn
docker pull umnrobotics/devcontainer:arm64.user.umn

docker manifest rm umnrobotics/isaac_ros:latest
docker manifest create umnrobotics/isaac_ros:latest --amend umnrobotics/isaac_ros:arm64.ros2_humble.user.umn --amend umnrobotics/isaac_ros:x86_64.ros2_humble.user.umn
docker manifest push umnrobotics/isaac_ros:latest
docker manifest rm umnrobotics/devcontainer:latest
docker manifest create umnrobotics/devcontainer:latest --amend umnrobotics/devcontainer:arm64.user.umn --amend umnrobotics/devcontainer:x86_64.user.umn
docker manifest push umnrobotics/devcontainer:latest

docker buildx create --use
devcontainer build --push true --workspace-folder . --platform="linux/amd64,linux/arm64" --image-name "umnrobotics/ros:isaac_ros_devcontainer"
devcontainer build --push true --workspace-folder . --platform="linux/amd64,linux/arm64" --image-name "umnrobotics/ros:ros_devcontainer"
```
</details>

<details>
<summary>How to Run Inside ISAAC ROS Container/Dev Container On Linux/Jetson</summary>
<summary>How to Run Inside the ISAAC ROS Container on Linux/Jetson</summary>
<br>
First, do the following before running run_dev.sh:
First, you will need to log in to Nvidia NGC and get an API Key here: https://org.ngc.nvidia.com/setup

```
printf "CONFIG_IMAGE_KEY=ros2_humble.realsense.deepstream.user.zed.umn \n" > ~/Lunabotics/src/isaac_ros/isaac_ros_common/scripts/.isaac_ros_common-config
```
To use Gazebo in the ISAAC ROS container, do this instead:
Then install Nvidia ngc CLI and make sure it is present in path: https://org.ngc.nvidia.com/setup/installers/cli

```
printf "CONFIG_IMAGE_KEY=ros2_humble.realsense.deepstream.user.zed.umn.gazebo \n" > ~/Lunabotics/src/isaac_ros/isaac_ros_common/scripts/.isaac_ros_common-config
```
<details>
<summary>Regular Container</summary>
<br>
To make it so zed modules won't rerun every time you start the container, do this:
Follow the instructions on the website to install and configure ngc.

Test the ngc installation by running `ngc` in a new terminal. If it doesn't work, try adding `chmod u+x ngc-cli/ngc` to your `~/.bashrc` file.

```
echo "-v /usr/local/zed/resources:/usr/local/zed/resources -v /ssd:/ssd" > ~/Lunabotics/src/isaac_ros/isaac_ros_common/scripts/.isaac_ros_dev-dockerargs
```
Then run this command:
Then log in to nvcr with the following command:

```
cd ~/Lunabotics/src/isaac_ros/isaac_ros_common/docker
../scripts/run_dev.sh ~/Lunabotics
```
Alternatively, you can run this command, which will execute the printf, the echo, and the run_dev.sh script:
```
./scripts/enter_isaac_ros_container.sh
```
</details>
<details>
<summary>Dev Container</summary>
<br>
First run this command to build the container:
docker login nvcr.io

```
../scripts/build_devcontainer_image.sh
Username: $oauthtoken
Password: <Your Key>
```

Then use Command Palette (Ctrl + Shift + P) to open devcontainer
Run this command to build and enter the isaac ros container
```
>Dev Containers: Reopen in Container
./scripts/enter_isaac_ros_container.sh
```

</details>
It is also worth noting that the docker buildkit doesn't respect Nvidia runtime for building which is needed for zed, so if you set up a new jetson you will need to do one of the following (https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_common/issues/98#issuecomment-1777711989)
</details>

## ROS 2 General Workspace Tips
Expand Down
2 changes: 1 addition & 1 deletion config/nav2_isaac_sim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ local_costmap:
plugin: "nvblox::nav2::NvbloxCostmapLayer"
enabled: True
max_obstacle_distance: 1.0
nvblox_map_slice_topic: "/nvblox_node/combined_esdf"
nvblox_map_slice_topic: "/nvblox_node/static_map_slice"
inflation_layer:
plugin: "nav2_costmap_2d::InflationLayer"
enabled: True
Expand Down
16 changes: 8 additions & 8 deletions config/nvblox/nvblox_base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
voxel_size: 0.05
use_tf_transforms: true
# multi mapper
mapping_type: "static_tsdf" # ["static_tsdf", "static_occupancy"]
mapping_type: "static_tsdf" # ["static_tsdf", "static_occupancy"]
connected_mask_component_size_threshold: 2000
# esdf settings
compute_esdf: true
esdf_update_rate_hz: 10.0
esdf_2d: false
publish_esdf_distance_slice: true

esdf_2d_min_height: -1.5
esdf_2d_max_height: 1.0
# mesh settings
Expand Down Expand Up @@ -44,12 +44,12 @@
# Used for crater detection.
# one is the floor, two is hole level
# by going significantly above 'ground', we ignore all the noise from uneven terrain while still detecting obstacles.
esdf_above_ground_slice_height: 0.4 # TODO: This might need to be adjusted
esdf_underground_detection: -1.0 # TODO: This might need to be adjusted
combine_pointcloud: True
combine_costmap: True
invert_below_ground: False
above_ground_denoise_level: 0.5
# esdf_above_ground_slice_height: 0.4 # TODO: This might need to be adjusted
# esdf_underground_detection: -1.0 # TODO: This might need to be adjusted
# combine_pointcloud: True
# combine_costmap: True
# invert_below_ground: False
# above_ground_denoise_level: 0.5

static_mapper:
# mapper
Expand Down
4 changes: 3 additions & 1 deletion config/nvblox/specializations/nvblox_gazebo_sim.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/**:
ros__parameters:
use_sim_time: true
# Lidar settings
use_lidar: false
# QoS settings
depth_qos: "SENSOR_DATA"
color_qos: "SENSOR_DATA"
33 changes: 11 additions & 22 deletions config/rviz/isaac_sim_example.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -70,28 +70,19 @@ Visualization Manager:
Tree:
odom:
base_link:
camera_left_ROS_frame:
{}
camera_right_ROS_frame:
{}
camera_sensor_left:
{}
camera_sensor_right:
{}
carter_lidar:
{}
camera_left_ROS_frame: {}
camera_right_ROS_frame: {}
camera_sensor_left: {}
camera_sensor_right: {}
carter_lidar: {}
chassis_link:
caster_frame_base:
caster_swivel_left:
caster_wheel_left:
{}
caster_wheel_left: {}
caster_swivel_right:
caster_wheel_right:
{}
wheel_left:
{}
wheel_right:
{}
caster_wheel_right: {}
wheel_left: {}
wheel_right: {}
Update Interval: 0
Value: true
- Alpha: 0.5
Expand Down Expand Up @@ -131,8 +122,7 @@ Visualization Manager:
- Class: rviz_default_plugins/MarkerArray
Enabled: false
Name: Mesh Marker
Namespaces:
{}
Namespaces: {}
Topic:
Depth: 5
Durability Policy: Volatile
Expand All @@ -143,8 +133,7 @@ Visualization Manager:
- Class: rviz_default_plugins/Marker
Enabled: false
Name: Map Slice Bounds
Namespaces:
{}
Namespaces: {}
Topic:
Depth: 5
Durability Policy: Volatile
Expand Down
Loading