Isaac Sim 3(学习笔记5.8)

news/2024/9/23 11:21:21/

Isaac Sim 利用深度学习获取mask掩码图

参考内容

Kubernetes官网

在 Linux 系统中安装并设置 kubectl | Kubernetes准备开始 kubectl 版本和集群版本之间的差异必须在一个小版本号内。 例如:v1.30 版本的客户端能与 v1.29、 v1.30 和 v1.31 版本的控制面通信。 用最新兼容版的 kubectl 有助于避免不可预见的问题。在 Linux 系统中安装 kubectl 在 Linux 系统中安装 kubectl 有如下几种方法:用 curl 在 Linux 系统中安装 kubectl 用原生包管理工具安装 用其他包管理工具安装 用 curl 在 Linux 系统中安装 kubectl 用以下命令下载最新发行版:x86-64 ARM64 curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/arm64/kubectl" 说明: 如需下载某个指定的版本,请用指定版本号替换该命令的这一部分: $(curl -L -s https://dl.k8s.io/release/stable.txt)。例如,要在 Linux x86-64 中下载 1.30.0 版本,请输入:curl -LO https://dl.k8s.io/release/v1.30.0/bin/linux/amd64/kubectl 对于 Linux ARM64 来说,请输入:icon-default.png?t=N7T8https://kubernetes.io/zh-cn/docs/tasks/tools/install-kubectl-linux/使用Isaac Sim进行DNN图像分割教程

Tutorial for DNN Image Segmentation with Isaac Sim — isaac_ros_docs documentationicon-default.png?t=N7T8https://nvidia-isaac-ros.github.io/concepts/segmentation/unet/tutorial_isaac_sim.html设置开发环境等

isaac_ros_unet — isaac_ros_docs documentationicon-default.png?t=N7T8https://nvidia-isaac-ros.github.io/repositories_and_packages/isaac_ros_image_segmentation/isaac_ros_unet/index.html#quickstartDeveloper Environment Setup — isaac_ros_docs documentationicon-default.png?t=N7T8https://nvidia-isaac-ros.github.io/getting_started/dev_env_setup.html安装NVIDIA容器工具包

Installing the NVIDIA Container Toolkit — NVIDIA Container Toolkit 1.15.0 documentationicon-default.png?t=N7T8https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html#prerequisites

一.设置Docker、安装NVIDIA工具包、容器部署

这里我在别的地方写过,在下方链接的第二章内容中

Ubuntu20.04 ISAAC SIM仿真下载使用流程_ubuntu启动isaac sim后一直有rtx loading界面-CSDN博客文章浏览阅读1.4k次,点赞38次,收藏30次。Ubuntu20.04 ISAAC SIM仿真下载使用流程机器:华硕天选X2024显卡:4060Tiubuntu20.04安装显卡驱动版本:525.85.05_ubuntu启动isaac sim后一直有rtx loading界面https://blog.csdn.net/weixin_61044335/article/details/137866781?spm=1001.2014.3001.5501说实在的我不知道为什么nvidia不同文档写的下载的内容不一样,哪个是必要,哪个是不必要也不清晰,没办法我先把以前做过的东西放在这儿,我再去跟着官网走一遍捋一捋

二.跟着官网再走一次

我因为想拿到图像分割的掩码,于是跟着官网走Tutorial for DNN Image Segmentation with Isaac Sim — isaac_ros_docs documentation

提示要先完成isaac_ros_unet — isaac_ros_docs documentation 中1~9的内容,于是我又去这个网站

这里又要我根据 Developer Environment Setup — isaac_ros_docs documentation 说明来设置开发环境,好吧继续

在上文链接中我已经配置好了docker,继续走下一步

接下来是https://nvidia-isaac-ros.github.io/getting_started/dev_env_setup.html中的环境设置部分:

  1. On x86_64 platforms:

    1. Install the nvidia-container-toolkit using the instructions.

    2. Configure nvidia-container-toolkit for Docker using the instructions.

    On Jetson platforms: Follow this instruction to first set your Jetson up with SSD, then come back to this document and resume from Step 2.

  2. Restart Docker:

    sudo systemctl daemon-reload && sudo systemctl restart docker
  3. Install Git LFS to pull down all large files:

    sudo apt-get install git-lfs
    git lfs install --skip-repo
  4. Create a ROS 2 workspace for experimenting with Isaac ROS:

    For Jetson setup with SSD as optional storage:

    mkdir -p  /ssd/workspaces/isaac_ros-dev/src
    echo "export ISAAC_ROS_WS=/ssd/workspaces/isaac_ros-dev/" >> ~/.bashrc
    source ~/.bashrc
    
    mkdir -p  ~/workspaces/isaac_ros-dev/src
    echo "export ISAAC_ROS_WS=${HOME}/workspaces/isaac_ros-dev/" >> ~/.bashrc
    source ~/.bashrc
    

    We expect to use the ISAAC_ROS_WS environmental variable to refer to this ROS 2 workspace directory, in the future.

To further customize your development environment, check out this guide.

很好走完了,接下来去做图像分割的前置步骤:

  1. Clone isaac_ros_common and this repository under ${ISAAC_ROS_WS}/src.

    cd ${ISAAC_ROS_WS}/src
    
    git clone https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_common.git
    
    git clone https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_image_segmentation.git
    
  2. Pull down a ROS Bag of sample data:

    cd ${ISAAC_ROS_WS}/src/isaac_ros_image_segmentation && \git lfs pull -X "" -I "resources/rosbags/"
    
  3. Launch the Docker container using the run_dev.sh script:

    cd ${ISAAC_ROS_WS}/src/isaac_ros_common && \./scripts/run_dev.sh
    
  4. Install this package’s dependencies.

sudo apt-get install -y ros-humble-isaac-ros-unet ros-humble-isaac-ros-triton ros-humble-isaac-ros-dnn-image-encoder
  1. Download the PeopleSemSegNet ShuffleSeg ETLT file and the int8 inference mode cache file:

    mkdir -p /tmp/models/peoplesemsegnet_shuffleseg/1 && \cd /tmp/models/peoplesemsegnet_shuffleseg && \wget https://api.ngc.nvidia.com/v2/models/nvidia/tao/peoplesemsegnet/versions/deployable_shuffleseg_unet_v1.0/files/peoplesemsegnet_shuffleseg_etlt.etlt && \wget https://api.ngc.nvidia.com/v2/models/nvidia/tao/peoplesemsegnet/versions/deployable_shuffleseg_unet_v1.0/files/peoplesemsegnet_shuffleseg_cache.txt
    
  2. Convert the ETLT file to a TensorRT plan file:

    /opt/nvidia/tao/tao-converter -k tlt_encode -d 3,544,960 -p input_2:0,1x3x544x960,1x3x544x960,1x3x544x960 -t int8 -c peoplesemsegnet_shuffleseg_cache.txt -e /tmp/models/peoplesemsegnet_shuffleseg/1/model.plan -o argmax_1 peoplesemsegnet_shuffleseg_etlt.etlt
    
  3. Create a file called /tmp/models/peoplesemsegnet_shuffleseg/config.pbtxt by copying the sample Triton config file:

    cp /workspaces/isaac_ros-dev/src/isaac_ros_image_segmentation/resources/peoplesemsegnet_shuffleseg_config.pbtxt /tmp/models/peoplesemsegnet_shuffleseg/config.pbtxt
    
  4. Run the following launch files to spin up a demo of this package:

    ros2 launch isaac_ros_unet isaac_ros_unet_triton.launch.py model_name:=peoplesemsegnet_shuffleseg model_repository_paths:=['/tmp/models'] input_binding_names:=['input_2:0'] output_binding_names:=['argmax_1'] network_output_type:='argmax' input_image_width:=1200 input_image_height:=632
    

    Then open another terminal, and enter the Docker container again:

    cd ${ISAAC_ROS_WS}/src/isaac_ros_common && \./scripts/run_dev.sh
    

    Then, play the ROS bag:

    ros2 bag play -l src/isaac_ros_image_segmentation/resources/rosbags/unet_sample_data/
    
  5. Visualize and validate the output of the package by launching rqt_image_view in another terminal: In a third terminal, enter the Docker container again:

    cd ${ISAAC_ROS_WS}/src/isaac_ros_common && \./scripts/run_dev.sh
    

    Then launch rqt_image_view:

    ros2 run rqt_image_view rqt_image_view
    

    Then inside the rqt_image_view GUI, change the topic to /unet/colored_segmentation_mask to view a colorized segmentation mask.

https://media.githubusercontent.com/media/NVIDIA-ISAAC-ROS/.github/main/resources/isaac_ros_docs/repositories_and_packages/isaac_ros_image_segmentation/isaac_ros_unet/peoplesemsegnet_shuffleseg_rqt.png/


http://www.ppmy.cn/news/1458016.html

相关文章

微信在线投票送礼物票选小程序源码系统 带完整的安装代码包以及安装搭建教程

在数字化时代,互动与参与成为吸引用户的关键。为了满足广大用户对于在线投票和礼物赠送的需求,我们特别推出了这款微信在线投票送礼物票选小程序源码系统。该系统不仅提供完整的安装代码包,还附带详细的安装搭建教程,让用户轻松搭…

韩国站群服务器如何提升网站性能与用户体验?

韩国站群服务器如何提升网站性能与用户体验? 在当今数字化时代,网站性能和用户体验对于吸引和保留用户至关重要。为了提供快速、稳定和优质的服务,越来越多的网站管理员开始利用韩国站群服务器来优化其网站性能。本文将探讨如何利用韩国站群服务器来提…

Liunx系统怎么设置免密登录?看这一篇!

远程口令爆破也是黑客常用的手段,有些人安全意识薄弱的会设置一些简单的密码,这样分分钟会被黑客爆破进去,一旦操作系统沦陷,里面的数据必将被黑客一览无余,使用免密登录可以有效降低密码被爆破的风险,具体…

【ITK配准】第七期 尺度(Metric)-互信息Metric

很高兴在雪易的CSDN遇见你 VTK技术爱好者 QQ:870202403 公众号:VTK忠粉 前言 本文分享ITK中的互信息Metric,即itk::MutualInformationImageToImageMetric & itk::MattesMutualInformationImageToImageMetric,,希望对各位小伙伴有所帮助! 感谢各位小伙伴的点…

leetcode-5. 最长回文子串

题目描述 给你一个字符串 s,找到 s 中最长的回文子串。 如果字符串的反序与原始字符串相同,则该字符串称为回文字符串。 示例 1: 输入:s "babad" 输出:"bab" 解释:"aba"…

本地加载hugging face模型:Bert

找了个hf的镜像站,把config.json和pytorch_model.bin两个文件进行下载下来,模型文件uncased_L-12_H-768_A-12.zip下载下来先。 解压模型文件压缩包,把前面下载的两个文件也放进去,总共6个文件。这个文件夹就是代码 tokenizer Be…

北交所佣金费率标准是多少?北交所相关信息科普

北交所的佣金费率并非固定不变,而是可以根据投资者的需求和证券公司的政策进行调整。目前北交所的佣金费率最低是万分之二。 一般来说,北交所的佣金费率默认在万分之三左右,但这不是固定的费率。根据证券公司的不同,佣金费率可以…

【C++语言】多态

多态(Polymorphism)是面向对象编程中的一个重要概念,它允许不同类的对象对同一消息作出不同的响应。在C中,多态性通过虚函数(Virtual Function)和动态绑定(Dynamic Binding)来实现。…