Giter VIP home page Giter VIP logo

dodo_detector_ros's Introduction

Object detection from images/point cloud using ROS

This ROS package creates an interface with dodo detector, a Python package that detects objects from images.

This package makes information regarding detected objects available in a topic, using a special kind of message.

When using an OpenNI-compatible sensor (like Kinect) the package uses point cloud information to locate objects in the world, wrt. to the sensor.

Click the image below for a YouTube video showcasing the package at work.

Youtube video

Installation

This repo is a ROS package, so it should be put alongside your other ROS packages inside the src directory of your catkin workspace.

The package depends mainly on a Python package, also created by me, called dodo detector. Check the README file over there for a list of dependencies unrelated to ROS, but related to object detection in Python.

Other ROS-related dependencies are listed on package.xml. If you want to use the provided launch files, you are going to need uvc_camera to start a webcam, freenect to access a Kinect for Xbox 360 or libfreenect2 and iai_kinect2 to start a Kinect for Xbox One.

If you use other kinds of sensor, make sure they provide an image topic and an optional point cloud topic, which will be needed later.

Usage

To use the package, first open the configuration file provided in config/main_config.yaml. These two global parameters must be configured for all types of detectors:

  • global_frame: the frame or tf that all object tfs will be published in relation to, eg map. Leave blank to publish wrt. camera_link.
  • tf_prefix: a prefix for the object tfs which will be published by the package.

Then, select which type of detector the package will use by setting the detector_type parameter. Acceptable values are sift, rootsift, tf1 or tf2.

TensorFlow-based detectors

tf1 and tf2 detectors use the TensorFlow Object Detection API.

TensorFlow 1 (for Python 2.7 and ROS Melodic Morenia downwards)

tf1 uses version 1 of the API, which works with TensorFlow 1.13 up until 1.15. It expects a label map and an inference graph. You can find these files here or provide your own. After you have these files, configure the following parameters in config/main_config.yaml:

  • inference_graph: path to the frozen inference graph (the .pb file).
  • label_map: path to the label map, (the .pbtxt file).
  • tf_confidence: confidence level to report objects as detected by the neural network, between 0 and 1.

TensorFlow 2 (for Python 3 and ROS Noetic Ninjemys upwards)

tf2 uses version 2 of the API, which works with TensorFlow 2. It expects a label map and a directory with the exported model. You can find these files here or provide your own. After you have these files, configure the following parameters in config/main_config.yaml:

  • saved_model: path to the directory with the saved model (usually exported with the name saved_model by the API).
  • label_map: path to the label map, (the .pbtxt file).
  • tf_confidence: confidence level to report objects as detected by the neural network, between 0 and 1.

Take a look here to understand how these parameters are used by the backend.

OpenCV keypoint-based detectors

If sift or rootsift are chosen, a keypoint object detector will be used. The following parameters must be set in config/main_config.yaml:

  • sift_min_pts: minimum number of points to consider an object as present in the scene.
  • sift_database_path: path to the database used by the keypoint object detector. Take a look here to understand how to set up the database directory.

Start the package

After all this configuration, you are ready to start the package. Either create your own .launch file or use one of the files provided in the launch directory of the repo.

In your launch file, load the config/main_config.yaml file you just configured in the previous step and provide an image_topic parameter to the detector.py node of the dodo_detector_ros package. This is the image topic that the package will use as input to detect objects.

You can also provide a point_cloud_topic parameter, which the package will use to position the objects detected in the image_topic in 3D space by publishing a TF for each detected object.

launch file examples

The example below initializes a webcam feed using the uvc_camera package and detects objects from the image_raw topic:

<?xml version="1.0"?>
<launch>
    <node name="camera" output="screen" pkg="uvc_camera" type="uvc_camera_node"/>
    
    <node name="dodo_detector_ros" pkg="dodo_detector_ros" type="detector.py" output="screen">
        <rosparam command="load" file="$(find dodo_detector_ros)/config/main_config.yaml"/>
        <param name="image_topic" value="/image_raw" />
    </node>
</launch>

The example below initializes a Kinect using the freenect package and subscribes to camera/rgb/image_color for images and /camera/depth/points for the point cloud:

<?xml version="1.0"?>
<launch>
    <include file="$(find freenect_launch)/launch/freenect.launch"/>
    
    <node name="dodo_detector_ros" pkg="dodo_detector_ros" type="detector.py" output="screen">
        <rosparam command="load" file="$(find dodo_detector_ros)/config/main_config.yaml"/>
        <param name="image_topic" value="/camera/rgb/image_color" />
        <param name="point_cloud_topic" value="/camera/depth/points" />
    </node>
</launch>

This example initializes a Kinect for Xbox One, using libfreenect2 and iai_kinect2 to connect to the device and subscribes to /kinect2/hd/image_color for images and /kinect2/hd/points for the point cloud. You can copy the launch file and use the sd and qhd topics instead of hd if you need more performance.

<?xml version="1.0"?>
<launch>    
    <include file="$(find kinect2_bridge)/launch/kinect2_bridge.launch">
        <param name="_depth_method" value="cpu" type="str"/>
    </include>
    
    <node name="dodo_detector_ros" pkg="dodo_detector_ros" type="detector.py" output="screen">
        <rosparam command="load" file="$(find dodo_detector_ros)/config/main_config.yaml"/>
        <param name="image_topic" value="/kinect2/hd/image_color" />
        <param name="point_cloud_topic" value="/kinect2/hd/points" />
    </node>
</launch>

These three launch files are provided inside the launch directory.

dodo_detector_ros's People

Contributors

douglasrizzo avatar fagnerpimentel avatar phdomingues avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dodo_detector_ros's Issues

new node registered with same name

I have Kinect Xbox360 camera

I run it by:
roslaunch freenect_launch freenect.launch
but when I run code
output to camera:

Shutdown request received.
[ WARN] [1550457789.122491887]: Reason given for shutdown: [new node registered with same name]
[camera/depth_rectify_depth-7] process has finished cleanly
log file: /home/turtlebot/.ros/log/e89c2338-3013-11e9-8a01-6c71d9e07c7b/camera-depth_rectify_depth-7*.log
[camera/rgb_debayer-3] process has finished cleanly
log file: /home/turtlebot/.ros/log/e89c2338-3013-11e9-8a01-6c71d9e07c7b/camera-rgb_debayer-3*.log
[camera/ir_rectify_ir-6] process has finished cleanly
log file: /home/turtlebot/.ros/log/e89c2338-3013-11e9-8a01-6c71d9e07c7b/camera-ir_rectify_ir-6*.log
[camera/depth_metric_rect-8] process has finished cleanly
log file: /home/turtlebot/.ros/log/e89c2338-3013-11e9-8a01-6c71d9e07c7b/camera-depth_metric_rect-8*.log
....
....
[camera/disparity_registered_hw-20] process has finished cleanly
log file: /home/turtlebot/.ros/log/e89c2338-3013-11e9-8a01-6c71d9e07c7b/camera-disparity_registered_hw-20*.log
[camera_base_link-21] process has finished cleanly
log file: /home/turtlebot/.ros/log/e89c2338-3013-11e9-8a01-6c71d9e07c7b/camera_base_link-21*.log
[camera_base_link2-23] process has finished cleanly
log file: /home/turtlebot/.ros/log/e89c2338-3013-11e9-8a01-6c71d9e07c7b/camera_base_link2-23*.log
[camera_base_link3-24] process has finished cleanly
log file: /home/turtlebot/.ros/log/e89c2338-3013-11e9-8a01-6c71d9e07c7b/camera_base_link3-24*.log
[camera/camera_nodelet_manager-1] process has died [pid 22315, exit code -11, cmd /opt/ros/indigo/lib/nodelet/nodelet manager __name:=camera_nodelet_manager __log:=/home/turtlebot/.ros/log/e89c2338-3013-11e9-8a01-6c71d9e07c7b/camera-camera_nodelet_manager-1.log].
log file: /home/turtlebot/.ros/log/e89c2338-3013-11e9-8a01-6c71d9e07c7b/camera-camera_nodelet_manager-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done

I change the name of the node but the same error

output code:
roslaunch dodo_detector_ros detect_kinect.launch
... logging to /home/redhwan/.ros/log/e89c2338-3013-11e9-8a01-6c71d9e07c7b/roslaunch-redhwan-10366.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://10.0.1.11:44733/

SUMMARY

PARAMETERS

  • /camera/camera_nodelet_manager/num_worker_threads: 4
  • /camera/depth_rectify_depth/interpolation: 0
  • /camera/depth_registered_rectify_depth/interpolation: 0
  • /camera/disparity_depth/max_range: 4.0
  • /camera/disparity_depth/min_range: 0.5
  • /camera/disparity_registered_hw/max_range: 4.0
  • /camera/disparity_registered_hw/min_range: 0.5
  • /camera/disparity_registered_sw/max_range: 4.0
  • /camera/disparity_registered_sw/min_range: 0.5
  • /camera/driver/data_skip: 0
  • /camera/driver/debug: False
  • /camera/driver/depth_camera_info_url:
  • /camera/driver/depth_frame_id: camera_depth_opti...
  • /camera/driver/depth_registration: False
  • /camera/driver/device_id: #1
  • /camera/driver/diagnostics_max_frequency: 30.0
  • /camera/driver/diagnostics_min_frequency: 30.0
  • /camera/driver/diagnostics_tolerance: 0.05
  • /camera/driver/diagnostics_window_time: 5.0
  • /camera/driver/enable_depth_diagnostics: False
  • /camera/driver/enable_ir_diagnostics: False
  • /camera/driver/enable_rgb_diagnostics: False
  • /camera/driver/rgb_camera_info_url:
  • /camera/driver/rgb_frame_id: camera_rgb_optica...
  • /dodo_detector_ros_1/detector_type: ssd
  • /dodo_detector_ros_1/inference_graph: ~/.frozen_inferen...
  • /dodo_detector_ros_1/label_map: ~/.mscoco_label_m...
  • /dodo_detector_ros_1/sift_database_path: ~/.dodo_detector_...
  • /dodo_detector_ros_1/sift_min_pts: 10
  • /dodo_detector_ros_1/ssd_confidence: 0.5
  • /rosdistro: indigo
  • /rosversion: 1.11.21

NODES
/camera/
camera_nodelet_manager (nodelet/nodelet)
depth_metric (nodelet/nodelet)
depth_metric_rect (nodelet/nodelet)
depth_points (nodelet/nodelet)
depth_rectify_depth (nodelet/nodelet)
depth_registered_hw_metric_rect (nodelet/nodelet)
depth_registered_metric (nodelet/nodelet)
depth_registered_rectify_depth (nodelet/nodelet)
depth_registered_sw_metric_rect (nodelet/nodelet)
disparity_depth (nodelet/nodelet)
disparity_registered_hw (nodelet/nodelet)
disparity_registered_sw (nodelet/nodelet)
driver (nodelet/nodelet)
ir_rectify_ir (nodelet/nodelet)
points_xyzrgb_hw_registered (nodelet/nodelet)
points_xyzrgb_sw_registered (nodelet/nodelet)
register_depth_rgb (nodelet/nodelet)
rgb_debayer (nodelet/nodelet)
rgb_rectify_color (nodelet/nodelet)
rgb_rectify_mono (nodelet/nodelet)
/
camera_base_link (tf/static_transform_publisher)
camera_base_link1 (tf/static_transform_publisher)
camera_base_link2 (tf/static_transform_publisher)
camera_base_link3 (tf/static_transform_publisher)
dodo_detector_ros_1 (dodo_detector_ros/detector.py)

ROS_MASTER_URI=http://10.0.1.15:11311

core service [/rosout] found
process[camera/camera_nodelet_manager-1]: started with pid [10375]
process[camera/driver-2]: started with pid [10376]
process[camera/rgb_debayer-3]: started with pid [10377]
process[camera/rgb_rectify_mono-4]: started with pid [10378]
process[camera/rgb_rectify_color-5]: started with pid [10379]
process[camera/ir_rectify_ir-6]: started with pid [10380]
process[camera/depth_rectify_depth-7]: started with pid [10384]
process[camera/depth_metric_rect-8]: started with pid [10388]
process[camera/depth_metric-9]: started with pid [10389]
process[camera/depth_points-10]: started with pid [10393]
process[camera/register_depth_rgb-11]: started with pid [10394]
process[camera/points_xyzrgb_sw_registered-12]: started with pid [10401]
process[camera/depth_registered_sw_metric_rect-13]: started with pid [10402]
process[camera/depth_registered_rectify_depth-14]: started with pid [10403]
process[camera/points_xyzrgb_hw_registered-15]: started with pid [10404]
process[camera/depth_registered_hw_metric_rect-16]: started with pid [10408]
process[camera/depth_registered_metric-17]: started with pid [10409]
process[camera/disparity_depth-18]: started with pid [10413]
process[camera/disparity_registered_sw-19]: started with pid [10414]
process[camera/disparity_registered_hw-20]: started with pid [10418]
process[camera_base_link-21]: started with pid [10419]
process[camera_base_link1-22]: started with pid [10420]
process[camera_base_link2-23]: started with pid [10424]
process[camera_base_link3-24]: started with pid [10425]
process[dodo_detector_ros_1-25]: started with pid [10429]
[ INFO] [1550458230.506965820]: Initializing nodelet with 4 worker threads.
[ INFO] [1550458230.747407276]: No devices connected.... waiting for devices to be connected
[INFO] [WallTime: 1550458230.792426] Chosen detector type: Single Shot Detector
Traceback (most recent call last):
File "/home/redhwan/catkin_ws/src/dodo_detector_ros/src/detector.py", line 215, in
Detector().run()
File "/home/redhwan/catkin_ws/src/dodo_detector_ros/src/detector.py", line 46, in init
self._detector = SingleShotDetector(frozen_graph, label_map, confidence=confidence)
File "/usr/local/lib/python2.7/dist-packages/dodo_detector/detection.py", line 354, in init
serialized_graph = fid.read()
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/lib/io/file_io.py", line 125, in read
self._preread_check()
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/lib/io/file_io.py", line 85, in _preread_check
compat.as_bytes(self.__name), 1024 * 512, status)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/errors_impl.py", line 528, in exit
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.NotFoundError: /home/redhwan/.frozen_inference_graph.pb; No such file or directory
[dodo_detector_ros_1-25] process has died [pid 10429, exit code 1, cmd /home/redhwan/catkin_ws/src/dodo_detector_ros/src/detector.py /camera/rgb/image_color:=/dodo_detector_ros/image_feed /camera/depth/points:=/dodo_detector_ros/pointcloud_feed __name:=dodo_detector_ros_1 __log:=/home/redhwan/.ros/log/e89c2338-3013-11e9-8a01-6c71d9e07c7b/dodo_detector_ros_1-25.log].
log file: /home/redhwan/.ros/log/e89c2338-3013-11e9-8a01-6c71d9e07c7b/dodo_detector_ros_1-25*.log
[ INFO] [1550458233.747590079]: No devices connected.... waiting for devices to be connected
[ INFO] [1550458236.747911355]: No devices connected.... waiting for devices to be connected
[ INFO] [1550458239.749531502]: No devices connected.... waiting for devices to be connected
[ INFO] [1550458242.749874082]: No devices connected.... waiting for devices to be connected
[ INFO] [1550458245.750216855]: No devices connected.... waiting for devices to be connected
[ INFO] [1550458248.750814892]: No devices connected.... waiting for devices to be connected

note:

paths of the data:
rospy.loginfo('/home/redhwan/models/research/inference_graph/ssd_mobilenet_v1_coco_11_06_2017' + frozen_graph)
rospy.loginfo('/home/redhwan/models/research/object_detection/data/' + label_map)

this is correct or not???
please help me
the code took a long time
thank you in advance

The name tf.GraphDef is deprecated. Please use tf.compat.v1.GraphDef instead. process has died

Hi, thanks for your work. Here's my problem.
the test of the installation of tensorflow works. Then i try to start your launchfile and the following error message appears. I can not get the problem solved.

/home/wanja/.local/lib/python2.7/site-packages/requests/init.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
warnings.warn(warning, RequestsDependencyWarning)
[INFO] [1582273517.282715]: Chosen detector type: Single Shot Detector
WARNING:tensorflow:From /home/wanja/.local/lib/python2.7/site-packages/dodo_detector/detection.py:365: The name tf.GraphDef is deprecated. Please use tf.compat.v1.GraphDef instead.

WARNING:tensorflow:From /home/wanja/.local/lib/python2.7/site-packages/dodo_detector/detection.py:366: The name tf.gfile.GFile is deprecated. Please use tf.io.gfile.GFile instead.

Traceback (most recent call last):
File "/home/wanja/catkin_ws/src/dodo_detector_ros/src/detector.py", line 227, in
Detector().run()
File "/home/wanja/catkin_ws/src/dodo_detector_ros/src/detector.py", line 49, in init
self._detector = SingleShotDetector(frozen_graph, label_map, confidence=confidence)
File "/home/wanja/.local/lib/python2.7/site-packages/dodo_detector/detection.py", line 367, in init
serialized_graph = fid.read()
File "/home/wanja/.local/lib/python2.7/site-packages/tensorflow_core/python/lib/io/file_io.py", line 122, in read
self._preread_check()
File "/home/wanja/.local/lib/python2.7/site-packages/tensorflow_core/python/lib/io/file_io.py", line 84, in _preread_check
compat.as_bytes(self.__name), 1024 * 512)
tensorflow.python.framework.errors_impl.NotFoundError: /home/wanja/.dodo_detector_ros/mscoco_frozen_inference_graph.pb; No such file or directory
[dodo_detector_ros-25] process has died [pid 22803, exit code 1, cmd /home/wanja/catkin_ws/src/dodo_detector_ros/src/detector.py __name:=dodo_detector_ros __log:=/home/wanja/.ros/log/d26984be-5481-11ea-8411-f48c50ffc21f/dodo_detector_ros-25.log].
log file: /home/wanja/.ros/log/d26984be-5481-11ea-8411-f48c50ffc21f/dodo_detector_ros-25*.log

Rviz crash due to invalid vector

So the other issue was Rviz would crash at random times once one of the objects have faded.

rviz: /build/ogre-1.9-i02lBV/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreNode.cpp:405: virtual void Ogre::Node::setPosition(const Ogre::Vector3&): Assertion !pos.isNaN() && "Invalid vector supplied as parameter"' failed.
`
So far I haven't been able to find a solution, I manually changed some stuff in Rviz but nothing helped.

Can't access tf2 when dodo detector installed in virtual environment

Hello we tried to install dodo detection in python 3 virtual environment since our ros catkin package is in 2.7, after all successful installation it show import tf2 error, so we tried to downgrade the dodo detector from 0.7 to 0.6.1 and also downgrade tensorflow and object detection api the dodo detector works fine but the dodo detector ros in the GitHub works only on tensorflow 2 can any one please send the previous version of dodo detector ros or any correct step to install dodo detector 0.7 I. Python 3 virtual environment and eliminate tf2 error

Transformation of Object issue

For some reason with my Zed camera setup, objects appear to be moved behind me and on the wrong side of my robot. If I step in front of the camera and i'm on the left, the transform appears on the right and instead of being frontwards its backwards behind the robot.

Also the node has a tendency to crash Rviz when it passes an incorrect vector.

Ready to detect! But not publishing anything

I managed to get all the dependencies and then your package seems not to publish anything which is weird since everything is correctly set up without warnings or errors

IMG_20190404_195045 (1)
IMG_20190404_195444
Any idea?

How to run this code in ros kinetic

hi @douglasrizzo , i tried to use your code, i found some errors due to the python version between ros and Dodo detector. Could you give me some tutorial in detail to run this code?

thank you in advance

error message :

(dodoTF) kubota-lab@kubotalab-P960EF:~/dodo_ws$ roslaunch dodo_detector_ros detect_kinect.launch
... logging to /home/kubota-lab/.ros/log/98b04c1a-fcdf-11ea-8592-5076afa87c35/roslaunch-kubotalab-P960EF-17153.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://192.168.3.18:39851/

SUMMARY
========

PARAMETERS
 * /camera/camera_nodelet_manager/num_worker_threads: 4
 * /camera/depth_rectify_depth/interpolation: 0
 * /camera/driver/color_depth_synchronization: False
 * /camera/driver/color_mode: 5
 * /camera/driver/depth_camera_info_url: 
 * /camera/driver/depth_frame_id: camera_depth_opti...
 * /camera/driver/depth_mode: 5
 * /camera/driver/depth_registration: False
 * /camera/driver/device_id: #1
 * /camera/driver/id_manufacturer: 1d27
 * /camera/driver/id_product: 0601
 * /camera/driver/ir_mode: 5
 * /camera/driver/rgb_camera_info_url: 
 * /camera/driver/rgb_frame_id: camera_rgb_optica...
 * /dodo_detector_ros/detector_type: tf
 * /dodo_detector_ros/image_topic: /camera/rgb/image...
 * /dodo_detector_ros/label_map: ~/.dodo_detector_...
 * /dodo_detector_ros/model_dir: ~/.dodo_detector_...
 * /dodo_detector_ros/point_cloud_topic: /camera/depth/points
 * /dodo_detector_ros/sift_database_path: ~/.dodo_detector_...
 * /dodo_detector_ros/sift_min_pts: 10
 * /dodo_detector_ros/tf_confidence: 0.5
 * /rosdistro: kinetic
 * /rosversion: 1.12.16

NODES
  /camera/
    camera_nodelet_manager (nodelet/nodelet)
    depth_metric (nodelet/nodelet)
    depth_metric_rect (nodelet/nodelet)
    depth_points (nodelet/nodelet)
    depth_rectify_depth (nodelet/nodelet)
    depth_registered_sw_metric_rect (nodelet/nodelet)
    driver (nodelet/nodelet)
    points_xyzrgb_sw_registered (nodelet/nodelet)
    register_depth_rgb (nodelet/nodelet)
    rgb_rectify_color (nodelet/nodelet)
  /
    camera_base_link (tf2_ros/static_transform_publisher)
    camera_base_link1 (tf2_ros/static_transform_publisher)
    camera_base_link2 (tf2_ros/static_transform_publisher)
    camera_base_link3 (tf2_ros/static_transform_publisher)
    dodo_detector_ros (dodo_detector_ros/detector.py)

ROS_MASTER_URI=http://192.168.3.18:11311/

process[camera/camera_nodelet_manager-1]: started with pid [17172]
process[camera/driver-2]: started with pid [17173]
process[camera/rgb_rectify_color-3]: started with pid [17174]
process[camera/depth_rectify_depth-4]: started with pid [17177]
[FATAL] [1600785401.910544972]: Failed to load nodelet '/camera/driver` of type `openni2_camera/OpenNI2DriverNodelet` to manager `camera_nodelet_manager'
process[camera/depth_metric_rect-5]: started with pid [17193]
[FATAL] [1600785401.915437517]: Failed to load nodelet '/camera/rgb_rectify_color` of type `image_proc/rectify` to manager `camera_nodelet_manager'
process[camera/depth_metric-6]: started with pid [17204]
[FATAL] [1600785401.923444755]: Failed to load nodelet '/camera/depth_rectify_depth` of type `image_proc/rectify` to manager `camera_nodelet_manager'
process[camera/depth_points-7]: started with pid [17221]
process[camera/register_depth_rgb-8]: started with pid [17224]
process[camera/points_xyzrgb_sw_registered-9]: started with pid [17242]
[FATAL] [1600785401.936025092]: Failed to load nodelet '/camera/depth_metric_rect` of type `depth_image_proc/convert_metric` to manager `camera_nodelet_manager'
process[camera/depth_registered_sw_metric_rect-10]: started with pid [17263]
[ INFO] [1600785401.941649751]: Initializing nodelet with 4 worker threads.
process[camera_base_link-11]: started with pid [17283]
process[camera_base_link1-12]: started with pid [17303]
process[camera_base_link2-13]: started with pid [17323]
process[camera_base_link3-14]: started with pid [17338]
process[dodo_detector_ros-15]: started with pid [17361]
[camera/driver-2] process has died [pid 17173, exit code 255, cmd /opt/ros/kinetic/lib/nodelet/nodelet load openni2_camera/OpenNI2DriverNodelet camera_nodelet_manager --no-bond ir:=ir rgb:=rgb depth:=depth depth_registered:=depth_registered rgb/image:=rgb/image_raw depth/image:=depth_registered/image_raw __name:=driver __log:=/home/kubota-lab/.ros/log/98b04c1a-fcdf-11ea-8592-5076afa87c35/camera-driver-2.log].
log file: /home/kubota-lab/.ros/log/98b04c1a-fcdf-11ea-8592-5076afa87c35/camera-driver-2*.log
[ERROR] [1600785402.046675411]: Failed to find nodelet with name '/camera/depth_rectify_depth' to unload.
[ERROR] [1600785402.049082404]: Failed to find nodelet with name '/camera/driver' to unload.
[ERROR] [1600785402.049156902]: Failed to find nodelet with name '/camera/depth_metric_rect' to unload.
[ERROR] [1600785402.049268860]: Failed to find nodelet with name '/camera/rgb_rectify_color' to unload.
[camera/rgb_rectify_color-3] process has died [pid 17174, exit code 255, cmd /opt/ros/kinetic/lib/nodelet/nodelet load image_proc/rectify camera_nodelet_manager --no-bond image_mono:=rgb/image_raw image_rect:=rgb/image_rect_color __name:=rgb_rectify_color __log:=/home/kubota-lab/.ros/log/98b04c1a-fcdf-11ea-8592-5076afa87c35/camera-rgb_rectify_color-3.log].
log file: /home/kubota-lab/.ros/log/98b04c1a-fcdf-11ea-8592-5076afa87c35/camera-rgb_rectify_color-3*.log
[camera/depth_rectify_depth-4] process has died [pid 17177, exit code 255, cmd /opt/ros/kinetic/lib/nodelet/nodelet load image_proc/rectify camera_nodelet_manager --no-bond image_mono:=depth/image_raw image_rect:=depth/image_rect_raw __name:=depth_rectify_depth __log:=/home/kubota-lab/.ros/log/98b04c1a-fcdf-11ea-8592-5076afa87c35/camera-depth_rectify_depth-4.log].
log file: /home/kubota-lab/.ros/log/98b04c1a-fcdf-11ea-8592-5076afa87c35/camera-depth_rectify_depth-4*.log
[camera/depth_metric_rect-5] process has died [pid 17193, exit code 255, cmd /opt/ros/kinetic/lib/nodelet/nodelet load depth_image_proc/convert_metric camera_nodelet_manager --no-bond image_raw:=depth/image_rect_raw image:=depth/image_rect __name:=depth_metric_rect __log:=/home/kubota-lab/.ros/log/98b04c1a-fcdf-11ea-8592-5076afa87c35/camera-depth_metric_rect-5.log].
log file: /home/kubota-lab/.ros/log/98b04c1a-fcdf-11ea-8592-5076afa87c35/camera-depth_metric_rect-5*.log
Traceback (most recent call last):
  File "/home/kubota-lab/dodo_ws/src/dodo_detector_ros/src/detector.py", line 6, in <module>
    import tf
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/tf/__init__.py", line 28, in <module>
    from tf2_ros import TransformException as Exception, ConnectivityException, LookupException, ExtrapolationException
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/tf2_ros/__init__.py", line 38, in <module>
    from tf2_py import *
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/tf2_py/__init__.py", line 38, in <module>
    from ._tf2 import *
ImportError: dynamic module does not define module export function (PyInit__tf2)
[dodo_detector_ros-15] process has died [pid 17361, exit code 1, cmd /home/kubota-lab/dodo_ws/src/dodo_detector_ros/src/detector.py __name:=dodo_detector_ros __log:=/home/kubota-lab/.ros/log/98b04c1a-fcdf-11ea-8592-5076afa87c35/dodo_detector_ros-15.log].
log file: /home/kubota-lab/.ros/log/98b04c1a-fcdf-11ea-8592-5076afa87c35/dodo_detector_ros-15*.log

[dodo_detector_ros-1] process has died

I followed the installation process in this way:
Having ROS kinetic installed in Ubuntu v16 with Python, installed:

  • dodo_detector

pip install git+https://github.com/douglasrizzo/dodo_detector.git

  • TensorFlow Object Detection API
pip install tensorflow
sudo apt-get install protobuf-compiler python-pil python-lxml python-tk
pip install --user Cython
pip install --user contextlib2
pip install --user jupyter
pip install --user matplotlib
  • dodo_detector_ros

roscd; cd ../src; git clone https://github.com/douglasrizzo/dodo_detector_ros.git

Then I use an Intel Sense camera that is integrated in a mobile robot so I change the launcher detect_kinect.launcher accordingly:

<?xml version="1.0"?>
<launch>
    <remap from="/camera/rgb/image_color" to="/camera_floor/driver/color/image_raw"/>
    <remap from="/camera/depth/points" to="/camera_floor/driver/depth/color/points"/>

    
    <node name="dodo_detector_ros" pkg="dodo_detector_ros" type="detector.py" output="screen">
        <rosparam command="load" file="$(find dodo_detector_ros)/config/main_config.yaml"/>
    </node>
</launch>

Once I make sure that the topics are being published, I execute your package and it gives me the following error:

user@user-VirtualBox:~/catkin_ws/src/dodo_detector_ros/src$ roslaunch dodo_detector_ros detect_kinect.launch 
... logging to /home/christen/.ros/log/c4591196-2ec6-11e9-bd96-94c6911e7b24/roslaunch-user-VirtualBox-3778.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://christen-VirtualBox:45683/

SUMMARY
========

PARAMETERS
 * /dodo_detector_ros/detector_type: ssd
 * /dodo_detector_ros/inference_graph: ~/.dodo_detector_...
 * /dodo_detector_ros/label_map: ~/.dodo_detector_...
 * /dodo_detector_ros/sift_database_path: ~/.dodo_detector_...
 * /dodo_detector_ros/sift_min_pts: 10
 * /dodo_detector_ros/ssd_confidence: 0.5
 * /rosdistro: kinetic
 * /rosversion: 1.12.14

NODES
  /
    dodo_detector_ros (dodo_detector_ros/detector.py)

ROS_MASTER_URI=http://192.168.12.20:11311

process[dodo_detector_ros-1]: started with pid [3787]
Traceback (most recent call last):
  File "/home/christen/catkin_ws/src/dodo_detector_ros/src/detector.py", line 12, in <module>
    from dodo_detector.detection import SingleShotDetector, KeypointObjectDetector
  File "/home/christen/.local/lib/python2.7/site-packages/dodo_detector/detection.py", line 11, in <module>
    from object_detection.utils import label_map_util
ImportError: No module named object_detection.utils
[dodo_detector_ros-1] process has died [pid 3787, exit code 1, cmd /home/christen/catkin_ws/src/dodo_detector_ros/src/detector.py /camera_floor/driver/color/image_raw:=/dodo_detector_ros/image_feed /camera_floor/obstacles:=/dodo_detector_ros/pointcloud_feed __name:=dodo_detector_ros __log:=/home/christen/.ros/log/c4591196-2ec6-11e9-bd96-94c6911e7b24/dodo_detector_ros-1.log].
log file: /home/christen/.ros/log/c4591196-2ec6-11e9-bd96-94c6911e7b24/dodo_detector_ros-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done

What am I doing wrong so that your package does not work?

cannot launch node of type [dodo_detector_ros/detector.py]

/opt/ros/melodic/lib/python2.7/dist-packages/roslib/packages.py:451: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
if resource_name in files:
ERROR: cannot launch node of type [dodo_detector_ros/detector.py]: can't locate node [detector.py] in package [dodo_detector_ros]

dodo_detector_ros: Cannot locate rosdep definition for [kinect2_bridge]

The package is working well. The problem comes when I am trying to compile other packages and an error pops up like this:

chbloca@chbloca-ThinkPad-T470s:~/catkin_ws/src$ rosdep install --from-paths ./ -i -y --rosdistro kinetic
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
dodo_detector_ros: Cannot locate rosdep definition for [kinect2_bridge]

I think it is caused by your package. Since I am not using kinect bridge, how can I get rid of this issue?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.