forked from HiroIshida/detic_ros
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
192 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
docker run --rm --net=host -it detic_ros:latest \ | ||
/bin/bash -i -c \ | ||
'source ~/.bashrc; \ | ||
rossetip; rossetmaster 133.11.216.219; \ | ||
roslaunch detic_ros sample_detection.launch \ | ||
debug:=true \ | ||
input_image:=/hsrb/head_rgbd_sensor/rgb/image_rect_color \ | ||
input_depth:=/hsrb/head_rgbd_sensor/depth_registered/image\ | ||
input_camera_info:=/hsrb/head_rgbd_sensor/depth_registered/camera_info' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#! /bin/sh | ||
|
||
# docker run --rm --net=host -it detic_ros:latest \ | ||
# /bin/bash | ||
|
||
docker run --rm --net=host -it detic_ros:latest \ | ||
/bin/bash -i -c \ | ||
'source ~/.bashrc; \ | ||
rossetip; rossetmaster 133.11.216.225; \ | ||
roslaunch detic_ros sample_detection.launch \ | ||
debug:=true \ | ||
compressed:=true \ | ||
vocabulary:=custom\ | ||
custom_vocabulary:=box\ | ||
input_image:=/hsrb/hand_camera/color/image_rect_color \ | ||
input_depth:=/hsrb/hand_camera/aligned_depth_to_color/image_raw \ | ||
input_camera_info:=/hsrb/hand_camera/aligned_depth_to_color/camera_info' | ||
# input_image:=/hsrb/head_rgbd_sensor/rgb/image_rect_color | ||
|
||
# input_depth:=/hsrb/head_rgbd_sensor/depth_registered/image_rect_raw \ | ||
# input_camera_info:=/hsrb/head_rgbd_sensor/depth_registered/camera_info' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#! /bin/sh | ||
|
||
# docker run --rm --net=host -it detic_ros:latest \ | ||
# /bin/bash | ||
|
||
docker run --rm --net=host -it detic_ros:latest \ | ||
/bin/bash -i -c \ | ||
'source ~/.bashrc; \ | ||
rossetip; rossetmaster 133.11.216.225; \ | ||
roslaunch detic_ros sample_detection.launch \ | ||
debug:=true \ | ||
compressed:=true \ | ||
vocabulary:=custom\ | ||
custom_vocabulary:=box\ | ||
input_image:=/hsrb/hand_camera/color/image_rect_color \ | ||
input_depth:=/hsrb/hand_camera/aligned_depth_to_color/image \ | ||
input_camera_info:=/hsrb/hand_camera/aligned_depth_to_color/camera_info' | ||
# input_image:=/hsrb/head_rgbd_sensor/rgb/image_rect_color | ||
|
||
# input_depth:=/hsrb/head_rgbd_sensor/depth_registered/image_rect_raw \ | ||
# input_camera_info:=/hsrb/head_rgbd_sensor/depth_registered/camera_info' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<launch> | ||
<arg name="namespace" default="docker" /> | ||
|
||
<arg name="verbose" default="true" /> | ||
<arg name="model_type" default="swin" /> | ||
<arg name="enable_pubsub" default="true" /> | ||
<arg name="out_debug_img" default="true" /> | ||
<arg name="out_debug_segimg" default="true" /> | ||
<arg name="confidence_threshold" default="0.5" /> | ||
<arg name="input_image" default="input" /> | ||
<arg name="compressed" default="true" /> | ||
<arg name="device" default="auto" /> | ||
<arg name="vocabulary" default="lvis" /> | ||
<arg name="custom_vocabulary" default="" /> | ||
|
||
<arg name="_input_image" default="/$(arg namespace)/decompressed_image" if="$(arg compressed)"/> | ||
<arg name="_input_image" default="$(arg input_image)" unless="$(arg compressed)"/> | ||
|
||
<group ns='$(arg namespace)'> | ||
|
||
|
||
<include file="$(find detic_ros)/launch/decompress.launch" if="$(arg compressed)"> | ||
<arg name="in" value="$(arg input_image)"/> | ||
</include> | ||
|
||
<node name="detic_segmentor" | ||
pkg="detic_ros" type="node.py" | ||
output="screen" > | ||
<remap from="~input_image" to="$(arg _input_image)"/> | ||
<param name="verbose" value="$(arg verbose)"/> | ||
<param name="model_type" value="$(arg model_type)" /> | ||
<param name="enable_pubsub" value="$(arg enable_pubsub)"/> | ||
<param name="out_debug_img" value="$(arg out_debug_img)"/> | ||
<param name="out_debug_segimg" value="$(arg out_debug_segimg)"/> | ||
<param name="confidence_threshold" value="$(arg confidence_threshold)"/> | ||
<param name="device" value="$(arg device)"/> | ||
<param name="vocabulary" value="$(arg vocabulary)" /> | ||
<param name="custom_vocabulary" value="$(arg custom_vocabulary)" /> | ||
</node> | ||
</group> | ||
</launch> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
u<?xml version="1.0" encoding="utf-8"?> | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<launch> | ||
|
||
<arg name="MANAGER" value="detic_detection_manager"/> | ||
|
||
<arg name="namespace" default="docker" /> | ||
|
||
<arg name="input_image" default="/kinect_head/rgb/image_rect_color"/> | ||
<arg name="input_depth" default="/kinect_head/depth_registered/image"/> | ||
<arg name="input_camera_info" default="/kinect_head/depth_registered/camera_info"/> | ||
<arg name="model_type" default="res50"/> | ||
<arg name="vocabulary" default="lvis"/> | ||
<arg name="custom_vocabulary" default=""/> | ||
<arg name="confidence_threshold" default="0.5"/> | ||
<arg name="debug" default="false"/> | ||
|
||
<arg name="_input_image" default="/$(arg namespace)/decompressed_image"/> | ||
<arg name="_input_depth" default="/$(arg namespace)/decompressed_depth"/> | ||
|
||
<group ns='$(arg namespace)'> | ||
|
||
<node name="$(arg MANAGER)" pkg="nodelet" type="nodelet" args="manager"/> | ||
|
||
<include file="$(find detic_ros)/launch/decompress_depth.launch"> | ||
<arg name="input_image" value="$(arg input_image)"/> | ||
<arg name="input_depth" value="$(arg input_depth)"/> | ||
</include> | ||
|
||
<node pkg="nodelet" type="nodelet" name="decompress_points" | ||
args="load depth_image_proc/point_cloud_xyzrgb $(arg MANAGER)"> | ||
<remap from="rgb/camera_info" to="$(arg input_camera_info)"/> | ||
<remap from="rgb/image_rect_color" to="$(arg _input_image)"/> | ||
<remap from="depth_registered/image_rect" to="$(arg _input_depth)"/> | ||
</node> | ||
|
||
<node name="detic_segmentor" pkg="detic_ros" type="node.py" output="screen"> | ||
<remap from="~input_image" to="$(arg _input_image)"/> | ||
<param name="enable_pubsub" value="true"/> | ||
<param name="use_jsk_msgs" value="true"/> | ||
<param name="verbose" value="$(arg debug)"/> | ||
<param name="out_debug_img" value="$(arg debug)"/> | ||
<param name="out_debug_segimg" value="$(arg debug)"/> | ||
<param name="model_type" value="$(arg model_type)"/> | ||
<param name="vocabulary" value="$(arg vocabulary)"/> | ||
<param name="custom_vocabulary" value="$(arg custom_vocabulary)"/> | ||
<param name="confidence_threshold" value="$(arg confidence_threshold)"/> | ||
</node> | ||
|
||
<node name="detic_label_image_to_indices" | ||
pkg="nodelet" type="nodelet" | ||
args="load jsk_pcl_utils/LabelToClusterPointIndices $(arg MANAGER)"> | ||
<remap from="~input" to="detic_segmentor/segmentation"/> | ||
<remap from="~output" to="detic_segmentor/indices"/> | ||
</node> | ||
|
||
<!-- cluster_filter: 1 may be unstable? jsk_recognition/#2737 --> | ||
<node name="detic_euclidean_clustering" | ||
pkg="nodelet" type="nodelet" | ||
args="load jsk_pcl/EuclideanClustering $(arg MANAGER)" | ||
clear_params="true"> | ||
<remap from="~input" to="depth_registered/points"/> | ||
<remap from="~input/cluster_indices" to="detic_segmentor/indices"/> | ||
<rosparam> | ||
multi: true | ||
tolerance: 0.03 | ||
min_size: 10 | ||
downsample_enable: true | ||
cluster_filter: 1 | ||
approximate_sync: true | ||
queue_size: 100 | ||
</rosparam> | ||
</node> | ||
|
||
<node name="detic_cluster_point_indices_decomposer" | ||
pkg="nodelet" type="nodelet" | ||
args="load jsk_pcl/ClusterPointIndicesDecomposer $(arg MANAGER)" | ||
clear_params="true"> | ||
<remap from="~input" to="depth_registered/points"/> | ||
<remap from="~target" to="detic_euclidean_clustering/output"/> | ||
<remap from="~boxes" to="detic_segmentor/output/boxes"/> | ||
<remap from="~centroid_pose_array" to="detic_segmentor/output/centroid"/> | ||
<rosparam> | ||
align_boxes: true | ||
align_boxes_with_plane: false | ||
force_to_flip_z_axis: false | ||
use_pca: false | ||
target_frame_id: base_footprint | ||
approximate_sync: true | ||
queue_size: 100 | ||
</rosparam> | ||
</node> | ||
|
||
</group> | ||
|
||
</launch> |