blodow / realtime_urdf_filter

ROS package that can filter geometry defined in URDF models from Kinect depth images. Can also preprocess data for the OpenNI tracker, to remove backgrounds, robots etc.
Other
89 stars 46 forks source link

[Question] why publish topic $(arg kinect_name)/camera_info #30

Closed lyh458 closed 3 years ago

lyh458 commented 3 years ago

Hi, thanks for your awesome works! When I use the forked repo of Jimmy DA SILVA @JimmyDaSilva with the command roslaunch realtime_urdf_filter filter_kinectV2.launch kinect_name:=kinect2 quality:=qhd, a new topic /kinect2/camera_info was published by node /kinect2_realtime_urdf_filter among the topics in the picture above, topics:

/kinect2/hd/camera_info
/kinect2/qhd/camera_info
/kinect2/sd/camera_info

are published by the diver of Kinect V2.

I am so doubted that why does the topic /kinect2/camera_info be published by the node /kinect2_realtime_urdf_filter and where defined the publisher? Is there any use of this topic?

And here is my code of filter_kinectV2.launch

<launch>

  <arg name="kinect_name" default="kinect2" />
  <arg name="quality" default="qhd" />

  <node pkg="realtime_urdf_filter" type="realtime_urdf_filter" name="$(arg kinect_name)_realtime_urdf_filter" output="screen">
    <remap from="~input_depth" to="/$(arg kinect_name)/$(arg quality)/image_depth_rect"/>
    <remap from="~output_depth" to="/$(arg kinect_name)/$(arg quality)/image_depth_rect_filtered" />
    <remap from="~output_mask" to="/$(arg kinect_name)/urdf_filtered_mask" />
    <param name="camera_frame" value="/$(arg kinect_name)_ir_optical_frame" />

    <!-- WARNING: This file contains a hack for the KinectV2 -->
    <rosparam command="load" file="$(find realtime_urdf_filter)/launch/iiwa_filter_parameters_kinectV2.yaml"/>
  </node>      

  <!-- <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher">
  </node>            -->

</launch>

and the filter_kinectV2_parameters.yaml:

fixed_frame: /base_link
#camera_frame: /kinect1_rgb_optical_frame
### WARNING: Add 0.02 is a HACK to make it work with the KinectV2
camera_offset:
  translation: [0.0, 0.02, 0.0]
  rotation:    [0.0, 0.0, 0.0, 1.0]
# There is one entry for each URDIF that should be filtered
models: 
- model: "robot_description"
  tf_prefix: ""
# how far in front of the robot model is still deleted? (e.g. 0.05 = 5cm)
depth_distance_threshold: 0.15
show_gui: false
filter_replace_value: 0.0

Thanks again!

blodow commented 3 years ago

Hi Yihui!

I am sure the best person to ask would be jimmy, as his work is most recent on this project, it's been about 8 years that I've actively worked on this. The topic is published because of the advertiseCamera calls (https://github.com/JimmyDaSilva/realtime_urdf_filter/blob/current-settings/src/urdf_filter.cpp#L108-L112), see also the docs (http://docs.ros.org/en/diamondback/api/image_transport/html/classimage__transport_1_1ImageTransport.html). I am not sure I can give any more details in this regard :D

Cheers, Nico

JimmyDaSilva commented 3 years ago

Hi @lyh458, Sorry but I don't have access to a Kinect2 right now to test this on my computer. Anyway, is it really a problem if there is an extra useless topic ? What is exactly your problem when using realtime_urdf_filter ?

lyh458 commented 3 years ago

@blodow @JimmyDaSilva Thanks for your replies and sorry for trouble you. And actually I have no any error about using this package, except for question of the redundant /camera_info topic. It seem that it is not a problem for me to get a result, the picture below is one of my result: Is that normal?

JimmyDaSilva commented 3 years ago

Perfect. Looks pretty good to me.

lyh458 commented 3 years ago

Grad to hear that. It seems that the topic is useless and isn't subscribed by any nodes. Thanks again.