Skip to content

PMOD-Net: point-cloud-map-based metric scale obstacle detection by using a monocular camera

License

Notifications You must be signed in to change notification settings

shikishima-TasakiLab/pmod-ros2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PMOD-ROS2

PMOD-Net for ROS2.

Requirement

  • NVIDIA-Driver >=418.81.07
  • Docker >=19.03
  • NVIDIA-Docker2

Preparation

  1.  git clone https://github.com/shikishima-TasakiLab/pmod-ros1.git
  2. Place a trained Torch Script model in ./model.

Docker Image

  • pull

    docker pull shikishimatasakilab/pmod-ros2:amd64-torch1.7
  • build

    ./docker/build.foxy.amd64.sh

Start a Docker Container

  1. Start a Docker container with the following command.

    ./docker/run.sh
  2. Build source code.

    colcon build
    source /workspace/install/setup.bash

Launch

  1. Launch the ROS nodes with the following command.
    ros2 launch pmod_ros 5class.py

PMOD

ROS Launch

import os
from ament_index_python import get_package_share_directory
from launch import LaunchDescription
from launch_ros.actions import Node

def generate_launch_description():
    config_dir = os.path.join(get_package_share_directory('pmod_ros'), 'config')

    return LaunchDescription([
        Node(
            namespace='pmod',
            package='pmod_ros',
            executable='pmod',
            parameters=[
                {'hz': 5.0},
                {'sub_queue_size': 10},
                {'pub_queue_size': 2},
                {'use_optical_frame': False},
                {'pmod_config_path': os.path.join(config_dir, 'pmod-5class.yaml')},
                {'use_sync': False},
                {'pub_seg_id': True},
                {'pub_seg_color': False},
                {'pub_depth': True},
                {'pub_points_ground': False},
                {'pub_points_no_ground': False},
                {'pub_points_static': False},
                {'pub_points_dynamic': True},
            ],
        ),
    ])

dynamic2noground

ROS Launch

from ament_index_python import get_package_share_directory
from launch import LaunchDescription
from launch_ros.actions import Node

def generate_launch_description():

    return LaunchDescription([
        Node(
            namespace='pmod',
            package='pmod_ros',
            executable='dynamic2noground',
            parameters=[
                {'init_maps': [
                    "/workspace/src/pmod_ros/maps/noground.pcd",
                ]},
                {'init_frame_id': 'map'},
                {'radius': 5.0},
            ],
            remappings=[
                ('points_no_ground', '/points_no_ground')
            ]
        ),
    ])

About

PMOD-Net: point-cloud-map-based metric scale obstacle detection by using a monocular camera

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published