ROBOTIS-JAPAN-GIT / turtlebot3_slam_3d

Turtlebot3 3D-SLAM demo using RTAB-Map with Jetson TX2 and ZED Mini
176 stars 62 forks source link

Which node publish topic which is darknet_ros/label_image ? #2

Closed hyunoklee closed 6 years ago

hyunoklee commented 6 years ago

hi ~ I am looking for a 3D object detection solution to run on turtlebot3. So I am very happy to find ROBOTIS-JAPAN-GIT/turtlebot3_slam_3d.

However, there is an issue during the execution of turtlebot3_slam_3d turtlebot3_slam_3d.launch. I would very much appreciate your help.

There is no package publishing topic which is darknet_ros/label_image. The darknet ros package publish only three topic like below .
. object_detector ([std_msgs::Int8]) . bounding_boxes ([darknet_ros_msgs::BoundingBoxes]) . detection_image ([sensor_msgs::Image])

So I remap from darknet_ros/detection_image to darknet_ros/label_image like below.

  <!-- COORDINATES -->
  <node pkg="nodelet" type="nodelet" name="label_mask" args="load jsk_pcl_utils/LabelToClusterPointIndices $(arg MANAGER)">
    <!--<remap from="~input" to="darknet_ros/label_image"/>-->
    <remap from="~input" to="darknet_ros/detection_image"/>
    <remap from="~output" to="darknet_ros/cluster_points"/>
  </node>

Then erro occurs at connect function of label_to_cluster_point_indices_nodelet.cpp.

//erro log

terminate called after throwing an instance of 'cv_bridge::Exception'
  what():  [bgr8] is a color format but [32SC1] is not so they must have the same OpenCV type, CV_8UC3, CV16UC1 ....

//erro point at source code

  void LabelToClusterPointIndices::convert(
    const sensor_msgs::Image::ConstPtr& label_msg)
  {
    vital_checker_->poke();
    cv_bridge::CvImagePtr label_img_ptr = cv_bridge::toCvCopy(
     label_msg, sensor_msgs::image_encodings::TYPE_32SC1);

I think there is no package publishing topic which is darknet_ros/label_image. It will be very helpful if you let me know where darknet_ros/label_image Topic is publishing. Thank you.

Affonso-Gui commented 6 years ago

Hello,

I have made a few changes in darknet_ros to publish a label image (32SC1 encoded), as you can see in my forked branch: https://github.com/Affonso-Gui/darknet_ros https://github.com/Affonso-Gui/darknet_ros/commit/72581598e3c8a6e3bf912e8062e8b530ce72fa53

By following the instructions on the README this branch (with label image publisher) should be cloned naturally.

Also in this project we have some other custom forks such as the realsense one, so I really recommend to try following the README instructions strictly at first.

Best regards, Guilherme

hyunoklee commented 6 years ago

very thank you ~ i will try it. :)