Git Product home page Git Product logo

coral_usb_ros's Introduction

coral_usb_ros

main linter GitHub tag (latest by date) Docker Stars Docker Pulls Docker Automated Docker Build Status

ROS package for Coral Edge TPU USB Accelerator

Environment

  • Ubuntu 16.04 + Kinetic
  • Ubuntu 18.04 + Melodic
  • Ubuntu 20.04 + Noetic

If you want to run this on Ubuntu 14.04 + Indigo, please see indigo branch.

If you want to run this on PR2, please see pr2 branch.

Notice

We need python3.5 and above to run this package.

ROS node list

Object detector: edgetpu_object_detector.py

edgetpu_object_detector

For more information, please see here.

Face detector: edgetpu_face_detector.py

edgetpu_face_detector

For more information, please see here.

Human pose estimator: edgetpu_human_pose_estimator.py

edgetpu_human_pose_estimator

For more information, please see here.

Semantic segmenter: edgetpu_semantic_segmenter.py

edgetpu_semantic_segmenter

For more information, please see here.

Panorama object detector: edgetpu_panorama_object_detector.py

edgetpu_panorama_object_detector

For more information, please see here.

Panorama face detector: edgetpu_panorama_face_detector.py

edgetpu_panorama_face_detector

For more information, please see here.

Panorama human pose estimator: edgetpu_panorama_human_pose_estimator.py

edgetpu_panorama_human_pose_estimator

For more information, please see here.

Panorama semantic segmenter: edgetpu_panorama_semantic_segmenter.py

For more information, please see here.

Node manager: edgetpu_node_manager.py

EdgeTPU node manager to start, stop and switch multiple nodes.

This node manager is useful if you have limited TPU resource.

List available and running nodes

$ rosservice call /edgetpu_node_manager/list
running_node_name: "edgetpu_object_detector"
node_names:
  - edgetpu_object_detector
  - edgetpu_panorama_object_detector

Start or switch node

$ rosservice call /edgetpu_node_manager/start "name: 'edgetpu_object_detector'"
success: True
last_node_name: "edgetpu_panorama_object_detector"

Stop node

$ rosservice call /edgetpu_node_manager/stop "{}"
success: True
last_node_name: "edgetpu_object_detector"

For more information, please see here.

Setup

Edge TPU dependencies installation

echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" | sudo tee /etc/apt/sources.list.d/coral-edgetpu.list
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
sudo apt-get update
# If you do not have USB3, install libedgetpu1-legacy-std
sudo apt-get install libedgetpu1-legacy-max # Choose <YES> when asked
sudo apt-get install python3-edgetpu
sudo apt-get install python3-pip
wget https://dl.google.com/coral/python/tflite_runtime-1.14.0-cp35-cp35m-linux_x86_64.whl
pip3 install tflite_runtime-1.14.0-cp35-cp35m-linux_x86_64.whl
sudo apt-get install python3-pip
wget https://dl.google.com/coral/python/tflite_runtime-1.14.0-cp36-cp36m-linux_x86_64.whl
pip3 install tflite_runtime-1.14.0-cp36-cp36m-linux_x86_64.whl
sudo apt-get install python3-tflite-runtime

For more information, please see here.

Workspace build

Workspace build (Kinetic)

Kinetic workspace requires cv-bridge build with python3.5.

sudo apt-get install python3-catkin-pkg-modules python3-rospkg-modules python3-venv python3-empy
sudo apt-get install ros-kinetic-opencv3
sudo apt-get install ros-kinetic-catkin
pip3 install --user opencv-python==4.2.0.32 numpy\<1.19.0
source /opt/ros/kinetic/setup.bash
mkdir -p ~/coral_ws/src
cd ~/coral_ws/src
git clone https://github.com/jsk-ros-pkg/coral_usb_ros.git
wstool init
wstool merge coral_usb_ros/fc.rosinstall
wstool merge coral_usb_ros/fc.rosinstall.kinetic
wstool update
rosdep install --from-paths . --ignore-src -y -r
cd ~/coral_ws
catkin init
catkin config -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/include/python3.5m -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.5m.so
catkin build

Workspace build (Melodic + cv-bridge-python3)

sudo apt-get install python3-catkin-pkg-modules python3-rospkg-modules python3-venv python3-empy
sudo apt-get install python3-opencv
sudo apt-get install ros-melodic-catkin
source /opt/ros/melodic/setup.bash
mkdir -p ~/coral_ws/src
cd ~/coral_ws/src
git clone https://github.com/jsk-ros-pkg/coral_usb_ros.git
wstool init
wstool merge coral_usb_ros/fc.rosinstall
wstool update
rosdep install --from-paths . --ignore-src -y -r
cd ~/coral_ws
catkin init
catkin build

Workspace build (Noetic)

sudo apt-get install ros-noetic-catkin
source /opt/ros/noetic/setup.bash
mkdir -p ~/coral_ws/src
cd ~/coral_ws/src
git clone https://github.com/jsk-ros-pkg/coral_usb_ros.git
wstool init
wstool merge coral_usb_ros/fc.rosinstall
wstool update
rosdep install --from-paths . --ignore-src -y -r
cd ~/coral_ws
catkin init
catkin build

Model download

source ~/coral_ws/devel/setup.bash
roscd coral_usb/scripts
rosrun coral_usb download_models.py

Model training with your dataset

Please see here for more detailed information.

Add Device Access Permission

You need to your accout to plugdev group. To enable this feature, you need to re-loggin or run exec su -l $(whoami).

sudo adduser $(whoami) plugdev

Demo

Please choose one of these demo.

USB or Laptop camera demo

Run all following commands in different terminals in parallel.

Run roscore

roscore

Run usb_cam for normal image

# source normal workspace, not edge tpu workspace
source /opt/ros/${ROS_DISTRO}/setup.bash
rosrun usb_cam usb_cam_node

Run Edge TPU launch

# source edge tpu workspace
# THIS IS VERY IMPORTANT FOR MELODIC to set /opt/ros/${ROS_DISTRO}/lib/python2.7/dist-packages in $PYTHONPATH
source /opt/ros/${ROS_DISTRO}/setup.bash
# THIS PUT devel/lib/python3/dist-packages in fornt of /opt/ros/${ROS_DISTRO}/lib/python2.7/dist-package
source ~/coral_ws/devel/setup.bash
# object detector
roslaunch coral_usb edgetpu_object_detector.launch INPUT_IMAGE:=/usb_cam/image_raw
# face detector
roslaunch coral_usb edgetpu_face_detector.launch INPUT_IMAGE:=/usb_cam/image_raw
# human pose estimator
roslaunch coral_usb edgetpu_human_pose_estimator.launch INPUT_IMAGE:=/usb_cam/image_raw
# semantic segmenter
roslaunch coral_usb edgetpu_semantic_segmenter.launch INPUT_IMAGE:=/usb_cam/image_raw

To subscribe compressed input image, use IMAGE_TRANSPORT:=compressed

roslaunch edgetpu_object_detector.launch INPUT_IMAGE:=/image_publisher/output IMAGE_TRANSPORT:=compressed

Run image_view

# source normal workspace, not edge tpu workspace
source /opt/ros/${ROS_DISTRO}/setup.bash
# object detector
rosrun image_view image_view image:=/edgetpu_object_detector/output/image
# face detector
rosrun image_view image_view image:=/edgetpu_face_detector/output/image
# human pose estimator
rosrun image_view image_view image:=/edgetpu_human_pose_estimator/output/image
# semantic segmenter
rosrun image_view image_view image:=/edgetpu_semantic_segmenter/output/image
# panorama object detector
rosrun image_view image_view image:=/edgetpu_panorama_object_detector/output/image
# panorama face detector
rosrun image_view image_view image:=/edgetpu_panorama_face_detector/output/image
# panorama human pose estimator
rosrun image_view image_view image:=/edgetpu_panorama_human_pose_estimator/output/image
# panorama semantic segmenter
rosrun image_view image_view image:=/edgetpu_panorama_semantic_segmenter/output/image

To subscribe compressed output image, set ~image_transport param to compressed

rosrun image_view image_view image:=/edgetpu_object_detector/output/image _image_transport:=compressed

No camera demo

Run all following commands in different terminals in parallel.

Run roscore

roscore

Run image_publisher for virtual camera

# source normal workspace, not edge tpu workspace
source /opt/ros/${ROS_DISTRO}/setup.bash
rosrun jsk_perception image_publisher.py _file_name:=$(rospack find jsk_perception)/sample/object_detection_example_1.jpg

Run Edge TPU launch

# source edge tpu workspace
# THIS IS VERY IMPORTANT FOR MELODIC to set /opt/ros/${ROS_DISTRO}/lib/python2.7/dist-packages in $PYTHONPATH
source /opt/ros/${ROS_DISTRO}/setup.bash
# THIS PUT devel/lib/python3/dist-packages in fornt of /opt/ros/${ROS_DISTRO}/lib/python2.7/dist-package
source ~/coral_ws/devel/setup.bash
# object detector
roslaunch coral_usb edgetpu_object_detector.launch INPUT_IMAGE:=/image_publisher/output
# face detector
roslaunch coral_usb edgetpu_face_detector.launch INPUT_IMAGE:=/image_publisher/output
# human pose estimator
roslaunch coral_usb edgetpu_human_pose_estimator.launch INPUT_IMAGE:=/image_publisher/output
# semantic segmenter
roslaunch coral_usb edgetpu_semantic_segmenter.launch INPUT_IMAGE:=/image_publisher/output

Run image_view

# source normal workspace, not edge tpu workspace
source /opt/ros/${ROS_DISTRO}/setup.bash
# object detector
rosrun image_view image_view image:=/edgetpu_object_detector/output/image
# face detector
rosrun image_view image_view image:=/edgetpu_face_detector/output/image
# human pose estimator
rosrun image_view image_view image:=/edgetpu_human_pose_estimator/output/image
# semantic segmenter
rosrun image_view image_view image:=/edgetpu_semantic_segmenter/output/image
# panorama object detector
rosrun image_view image_view image:=/edgetpu_panorama_object_detector/output/image
# panorama face detector
rosrun image_view image_view image:=/edgetpu_panorama_face_detector/output/image
# panorama human pose estimator
rosrun image_view image_view image:=/edgetpu_panorama_human_pose_estimator/output/image
# panorama semantic segmenter
rosrun image_view image_view image:=/edgetpu_panorama_semantic_segmenter/output/image

Insta360 air camera demo

Run all following commands in different terminals in parallel.

Run roscore

roscore

Run insta360 air for panorama image

# source normal workspace, not edge tpu workspace
source /opt/ros/${ROS_DISTRO}/setup.bash
roslaunch jsk_perception sample_insta360_air.launch gui:=false

Run Edge TPU launch

For insta360 air panorama image

# source edge tpu workspace
# THIS IS VERY IMPORTANT FOR MELODIC to set /opt/ros/${ROS_DISTRO}/lib/python2.7/dist-packages in $PYTHONPATH
source /opt/ros/${ROS_DISTRO}/setup.bash
# THIS PUT devel/lib/python3/dist-packages in fornt of /opt/ros/${ROS_DISTRO}/lib/python2.7/dist-package
source ~/coral_ws/devel/setup.bash
# panorama object detector
roslaunch coral_usb edgetpu_panorama_object_detector.launch INPUT_IMAGE:=/dual_fisheye_to_panorama/output
# panorama face detector
roslaunch coral_usb edgetpu_panorama_face_detector.launch INPUT_IMAGE:=/dual_fisheye_to_panorama/output
# panorama human pose estimator
roslaunch coral_usb edgetpu_panorama_human_pose_estimator.launch INPUT_IMAGE:=/dual_fisheye_to_panorama/output
# panorama semantic segmenter
roslaunch coral_usb edgetpu_panorama_semantic_segmenter.launch INPUT_IMAGE:=/dual_fisheye_to_panorama/output

Run image_view

# source normal workspace, not edge tpu workspace
source /opt/ros/${ROS_DISTRO}/setup.bash
# object detector
rosrun image_view image_view image:=/edgetpu_object_detector/output/image
# face detector
rosrun image_view image_view image:=/edgetpu_face_detector/output/image
# human pose estimator
rosrun image_view image_view image:=/edgetpu_human_pose_estimator/output/image
# semantic segmenter
rosrun image_view image_view image:=/edgetpu_semantic_segmenter/output/image
# panorama object detector
rosrun image_view image_view image:=/edgetpu_panorama_object_detector/output/image
# panorama face detector
rosrun image_view image_view image:=/edgetpu_panorama_face_detector/output/image
# panorama human pose estimator
rosrun image_view image_view image:=/edgetpu_panorama_human_pose_estimator/output/image
# panorama semantic segmenter
rosrun image_view image_view image:=/edgetpu_panorama_semantic_segmenter/output/image

ROS node information

Object detector: edgetpu_object_detector.py

edgetpu_object_detector

Subscribing Topic

  • ~input/image (sensor_msgs/Image)

    • Input image

Publishing Topic

  • ~output/rects (jsk_recognition_msgs/RectArray)

    • Rectangles of detected objects
  • ~output/class (jsk_recognition_msgs/ClassificationResult)

    • Classification results of detected objects
  • ~output/image (sensor_msgs/Image)

    • Visualization of detection results

Parameters

  • ~classifier_name (String, default: rospy.get_name())

    • Classifier name
  • ~enable_visualization (Bool, default: True)

    • Whether enable visualization or not
  • ~visualize_duration (Float, default: 0.1)

    • Time duration for visualization
  • ~image_transport: (String, default: raw)

    • Set compressed to subscribe compressed image
  • ~always_publish (Bool, default: True)

    • Set false to publish when an object is detected.

Dynamic parameters

  • ~score_thresh: (Float, default: 0.6)

    • Score threshold for object detection
  • ~top_k: (Int, default: 100)

    • Maximum number of detected objects
  • ~model_file (String, default: package://coral_usb/models/mobilenet_ssd_v2_coco_quant_postprocess_edgetpu.tflite)

    • Model file path
  • ~label_file (String, default: package://coral_usb/models/coco_labels.txt)

    • Label file path.

Face detector: edgetpu_face_detector.py

edgetpu_face_detector

Subscribing Topic

  • ~input/image (sensor_msgs/Image)

    • Input image

Publishing Topic

  • ~output/rects (jsk_recognition_msgs/RectArray)

    • Rectangles of detected faces
  • ~output/class (jsk_recognition_msgs/ClassificationResult)

    • Classification results of detected faces
  • ~output/image (sensor_msgs/Image)

    • Visualization of detection results

Parameters

  • ~classifier_name (String, default: rospy.get_name())

    • Classifier name
  • ~enable_visualization (Bool, default: True)

    • Whether enable visualization or not
  • ~visualize_duration (Float, default: 0.1)

    • Time duration for visualization
  • ~image_transport: (String, default: raw)

    • Set compressed to subscribe compressed image
  • ~always_publish (Bool, default: True)

    • Set false to publish when a face is detected.

Dynamic parameters

  • ~score_thresh: (Float, default: 0.6)

    • Score threshold for face detection
  • ~top_k: (Int, default: 100)

    • Maximum number of detected faces
  • ~model_file (String, default: package://coral_usb/models/mobilenet_ssd_v2_face_quant_postprocess_edgetpu.tflite)

    • Model file path

Human pose estimator: edgetpu_human_pose_estimator.py

edgetpu_human_pose_estimator

Subscribing Topic

  • ~input/image (sensor_msgs/Image)

    • Input image

Publishing Topic

  • ~output/poses (jsk_recognition_msgs/PeoplePoseArray)

    • Estimated human poses
  • ~output/rects (jsk_recognition_msgs/RectArray)

    • Rectangles of detected humans
  • ~output/class (jsk_recognition_msgs/ClassificationResult)

    • Classification results of detected humans
  • ~output/image (sensor_msgs/Image)

    • Visualization of estimation results

Parameters

  • ~classifier_name (String, default: rospy.get_name())

    • Classifier name
  • ~model_file (String, default: package://coral_usb/python/coral_usb/posenet/models/posenet_mobilenet_v1_075_481_641_quant_decoder_edgetpu.tflite)

    • Model file path
  • ~enable_visualization (Bool, default: True)

    • Whether enable visualization or not
  • ~visualize_duration (Float, default: 0.1)

    • Time duration for visualization
  • ~image_transport: (String, default: raw)

    • Set compressed to subscribe compressed image
  • ~always_publish (Bool, default: True)

    • Set false to publish when a human pose is detected.

Dynamic parameters

  • ~score_thresh: (Float, default: 0.2)

    • Score threshold for human pose estimation
  • ~joint_score_thresh: (Float, default: 0.2)

    • Score threshold of each joint for human pose estimation

Semantic segmenter: edgetpu_semantic_segmenter.py

edgetpu_semantic_segmenter

Subscribing Topic

  • ~input/image (sensor_msgs/Image)

    • Input image

Publishing Topic

  • ~output/label (sensor_msgs/Image)

    • Estimated label image
  • ~output/image (sensor_msgs/Image)

    • Visualization of estimation results

Parameters

  • ~classifier_name (String, default: rospy.get_name())

    • Classifier name
  • ~model_file (String, default: package://coral_usb/models/deeplabv3_mnv2_pascal_quant_edgetpu.tflite)

    • Model file path
  • ~label_file (String, default: None)

    • Label file path. pascal_voc label is used by default.
  • ~enable_visualization (Bool, default: True)

    • Whether enable visualization or not
  • ~visualize_duration (Float, default: 0.1)

    • Time duration for visualization
  • ~image_transport: (String, default: raw)

    • Set compressed to subscribe compressed image

Panorama object detector: edgetpu_panorama_object_detector.py

edgetpu_panorama_object_detector

Subscribing Topic

  • ~input/image (sensor_msgs/Image)

    • Input image

Publishing Topic

  • ~output/rects (jsk_recognition_msgs/RectArray)

    • Rectangles of detected objects
  • ~output/class (jsk_recognition_msgs/ClassificationResult)

    • Classification results of detected objects
  • ~output/image (sensor_msgs/Image)

    • Visualization of detection results

Parameters

  • ~classifier_name (String, default: rospy.get_name())

    • Classifier name
  • ~enable_visualization (Bool, default: True)

    • Whether enable visualization or not
  • ~visualize_duration (Float, default: 0.1)

    • Time duration for visualization
  • ~image_transport: (String, default: raw)

    • Set compressed to subscribe compressed image
  • ~always_publish (Bool, default: True)

    • Set false to publish when an object is detected.

Dynamic parameters

  • ~score_thresh: (Float, default: 0.6)

    • Score threshold for object detection
  • ~top_k: (Int, default: 100)

    • Maximum number of detected objects
  • ~model_file (String, default: package://coral_usb/models/mobilenet_ssd_v2_coco_quant_postprocess_edgetpu.tflite)

    • Model file path
  • ~label_file (String, default: package://coral_usb/models/coco_labels.txt)

    • Label file path.
  • ~n_split (Int, default: 3)

    • Number of splitting images from one large panorama image.
  • ~overlap (Bool, default: True)

    • Recognize with overlapping splitted images.
  • ~nms (Bool, default: True)

    • Use non-maximum suppression or not for overlap detection.
  • ~nms_thresh (Double, default: 0.3)

    • Non-maximum suppression threshold

Panorama face detector: edgetpu_panorama_face_detector.py

edgetpu_panorama_face_detector

Subscribing Topic

  • ~input/image (sensor_msgs/Image)

    • Input image

Publishing Topic

  • ~output/rects (jsk_recognition_msgs/RectArray)

    • Rectangles of detected faces
  • ~output/class (jsk_recognition_msgs/ClassificationResult)

    • Classification results of detected faces
  • ~output/image (sensor_msgs/Image)

    • Visualization of detection results

Parameters

  • ~classifier_name (String, default: rospy.get_name())

    • Classifier name
  • ~enable_visualization (Bool, default: True)

    • Whether enable visualization or not
  • ~visualize_duration (Float, default: 0.1)

    • Time duration for visualization
  • ~image_transport: (String, default: raw)

    • Set compressed to subscribe compressed image
  • ~always_publish (Bool, default: True)

    • Set false to publish when a face is detected.

Dynamic parameters

  • ~score_thresh: (Float, default: 0.6)

    • Score threshold for face detection
  • ~top_k: (Int, default: 100)

    • Maximum number of detected faces
  • ~model_file (String, default: package://coral_usb/models/mobilenet_ssd_v2_face_quant_postprocess_edgetpu.tflite)

    • Model file path
  • ~n_split (Int, default: 3)

    • Number of splitting images from one large panorama image.
  • ~overlap (Bool, default: True)

    • Recognize with overlapping splitted images.
  • ~nms (Bool, default: True)

    • Use non-maximum suppression or not for overlap detection.
  • ~nms_thresh (Double, default: 0.3)

    • Non-maximum suppression threshold

Panorama human pose estimator: edgetpu_panorama_human_pose_estimator.py

edgetpu_panorama_human_pose_estimator

Subscribing Topic

  • ~input/image (sensor_msgs/Image)

    • Input image

Publishing Topic

  • ~output/poses (jsk_recognition_msgs/PeoplePoseArray)

    • Estimated human poses
  • ~output/rects (jsk_recognition_msgs/RectArray)

    • Rectangles of detected humans
  • ~output/class (jsk_recognition_msgs/ClassificationResult)

    • Classification results of detected humans
  • ~output/image (sensor_msgs/Image)

    • Visualization of estimation results

Parameters

  • ~classifier_name (String, default: rospy.get_name())

    • Classifier name
  • ~model_file (String, default: package://coral_usb/python/coral_usb/posenet/models/posenet_mobilenet_v1_075_481_641_quant_decoder_edgetpu.tflite)

    • Model file path
  • ~enable_visualization (Bool, default: True)

    • Whether enable visualization or not
  • ~visualize_duration (Float, default: 0.1)

    • Time duration for visualization
  • ~image_transport: (String, default: raw)

    • Set compressed to subscribe compressed image
  • ~always_publish (Bool, default: True)

    • Set false to publish when a human pose is detected.

Dynamic parameters

  • ~score_thresh: (Float, default: 0.2)

    • Score threshold for human pose estimation
  • ~joint_score_thresh: (Float, default: 0.2)

    • Score threshold of each joint for human pose estimation
  • ~n_split (Int, default: 3)

    • Number of splitting images from one large panorama image.
  • ~overlap (Bool, default: True)

    • Recognize with overlapping splitted images.

Panorama semantic segmenter: edgetpu_panorama_semantic_segmenter.py

Subscribing Topic

  • ~input/image (sensor_msgs/Image)

    • Input image

Publishing Topic

  • ~output/label (sensor_msgs/Image)

    • Estimated label image
  • ~output/image (sensor_msgs/Image)

    • Visualization of estimation results

Parameters

  • ~classifier_name (String, default: rospy.get_name())

    • Classifier name
  • ~model_file (String, default: package://coral_usb/models/deeplabv3_mnv2_pascal_quant_edgetpu.tflite)

    • Model file path
  • ~label_file (String, default: None)

    • Label file path. pascal_voc label is used by default.
  • ~enable_visualization (Bool, default: True)

    • Whether enable visualization or not
  • ~visualize_duration (Float, default: 0.1)

    • Time duration for visualization
  • ~image_transport: (String, default: raw)

    • Set compressed to subscribe compressed image

Dynamic parameters

  • ~n_split (Int, default: 3)

    • Number of splitting images from one large panorama image.

Node manager: edgetpu_node_manager.py

You can see the sample launch edgetpu_node_manager.launch

Parameters

  • ~nodes: (Dict, default: {})

    • Dictionary of node's name and type.
    • type can be as follow:
      • edgetpu_object_detector
      • edgetpu_face_detector
      • edgetpu_human_pose_estimator
      • edgetpu_semantic_segmenter
      • edgetpu_panorama_object_detector
      • edgetpu_panorama_face_detector
      • edgetpu_panorama_human_pose_estimator
      • edgetpu_panorama_semantic_segmenter
    • Parameters for each node can be set after name namespace.
  • ~default: (String, default: None)

    • Default node name
  • ~prefix: (String, default: '')

    • Prefix for each nodes

Service

  • ~start: (coral_usb/StartNode)

    • Start node by node name
  • ~stop: (coral_usb/StopNode)

    • Stop node

coral_usb_ros's People

Contributors

708yamaguchi avatar iory avatar ishigurojsk avatar k-okada avatar kanazawanaoaki avatar knorth55 avatar kochigami avatar makit0sh avatar mqcmd196 avatar shmpwk avatar sktometometo avatar tkmtnt7000 avatar yoshiaabe 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

coral_usb_ros's Issues

Error building on RP4 + Bionic + Melodic

Hello,

Thanks for the great module. I was trying to build this on Raspberry Pi 4 with Ubuntu Bionic and Ros Melodic. I am getting the following error when executing catkin_make from ~/coral_ws. Can you please offer any guidance?

Run Build Command:"/usr/bin/make" "cmTC_81fe1/fast"
/usr/bin/make -f CMakeFiles/cmTC_81fe1.dir/build.make CMakeFiles/cmTC_81fe1.dir/build
make[1]: Entering directory '/home/agentsingh/coral_ws/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_81fe1.dir/CheckSymbolExists.c.o
/usr/bin/cc    -o CMakeFiles/cmTC_81fe1.dir/CheckSymbolExists.c.o   -c /home/agentsingh/coral_ws/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_81fe1
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_81fe1.dir/link.txt --verbose=1
/usr/bin/cc      -rdynamic CMakeFiles/cmTC_81fe1.dir/CheckSymbolExists.c.o  -o cmTC_81fe1
CMakeFiles/cmTC_81fe1.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text+0x14): undefined reference to `pthread_create'
CheckSymbolExists.c:(.text+0x18): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_81fe1.dir/build.make:97: recipe for target 'cmTC_81fe1' failed
make[1]: *** [cmTC_81fe1] Error 1
make[1]: Leaving directory '/home/agentsingh/coral_ws/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_81fe1/fast' failed
make: *** [cmTC_81fe1/fast] Error 2

File /home/agentsingh/coral_ws/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef pthread_create
  return ((int*)(&pthread_create))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/agentsingh/coral_ws/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_57447/fast"
/usr/bin/make -f CMakeFiles/cmTC_57447.dir/build.make CMakeFiles/cmTC_57447.dir/build
make[1]: Entering directory '/home/agentsingh/coral_ws/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_57447.dir/CheckFunctionExists.c.o
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTC_57447.dir/CheckFunctionExists.c.o   -c /usr/share/cmake-3.10/Modules/CheckFunctionExists.c
Linking C executable cmTC_57447
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_57447.dir/link.txt --verbose=1
/usr/bin/cc  -DCHECK_FUNCTION_EXISTS=pthread_create    -rdynamic CMakeFiles/cmTC_57447.dir/CheckFunctionExists.c.o  -o cmTC_57447 -lpthreads
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_57447.dir/build.make:97: recipe for target 'cmTC_57447' failed
make[1]: *** [cmTC_57447] Error 1
make[1]: Leaving directory '/home/agentsingh/coral_ws/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_57447/fast' failed
make: *** [cmTC_57447/fast] Error 2

cv2 を見つけられない

こんばんは.
Run Edge TPU launchでobject detectorを立ち上げようとしているのですが,No module named 'cv2'となっています.
恐らく自分のパスが間違っているのかと思いますが,何か設定する必要があるのでしょうか.

edgetpu_human_pose_estimatorを可視化する際のバグ

北川さんが作って下さった部分のバグではないのですが、

roslaunch roseus_tutorials usb-camera.launch
roslaunch coral_usb edgetpu_human_pose_estimator.launch INPUT_IMAGE:=/image_raw

としてCoralを立ち上げた後、

rosrun image_view image_view image:=/edgetpu_human_pose_estimator/output/image

とするとエラーが出て可視化できなかったので、原因を調べたところ
https://gist.github.com/MiyabiTane/5282054021945c59c8202a0fdc307658#file-pose_engine-py-L99-L102
の部分でself.get_all_output_tensors_sizes()の中身は整数なのに、offsetが少数になってしまっていることが原因であることが分かりました。
そこで
https://gist.github.com/MiyabiTane/5282054021945c59c8202a0fdc307658#file-pose_engine-py-L103
のように直したところ、エラーがなくなり、結果を可視化することができました。

以前、@Kanazawanaoakiが自主プロでエラーなく動かすことができたという事例もあり、PCの環境に原因がある可能性もあるため、確認して頂きたく、issueにさせて頂きました、よろしくお願いします。@knorth55

tensorflow v2 model support

Hey,

I've read that only ssd models are supported for TFLite1 and TFLite2, so the hardware accelerator (Edge TPU) supports only ssd models until now. I saw that in the example the ssd_mobilenet_v2 i used for inference. But would the newer one (SSD MobileNet V2 FPNLite 640x640) of TensorFlow 2 also with this node?

dynamic_reconfigure goes wrong when edgetpu related nodes exist

When the target ROS network has edgetpu related nodes and I set my rosmaster connected to the machine, I got these error.

I checked with pr1040 or my docker environment.
It seems to occur both on 16.04 and 18.04.

($ rossetmaster pr1040 && rossetip)
$ rosrun rqt_reconfigure rqt_reconfigure 
PluginManager._load_plugin() could not load plugin "rqt_reconfigure/Param":
Traceback (most recent call last):
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/qt_gui/plugin_handler.py", line 102, in load
    self._load()
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/qt_gui/plugin_handler_direct.py", line 55, in _load
    self._plugin = self._plugin_provider.load(self._instance_id.plugin_id, self._context)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/qt_gui/composite_plugin_provider.py", line 72, in load
    instance = plugin_provider.load(plugin_id, plugin_context)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/qt_gui/composite_plugin_provider.py", line 72, in load
    instance = plugin_provider.load(plugin_id, plugin_context)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_gui_py/ros_py_plugin_provider.py", line 60, in load
    return super(RosPyPluginProvider, self).load(plugin_id, plugin_context)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/qt_gui/composite_plugin_provider.py", line 72, in load
    instance = plugin_provider.load(plugin_id, plugin_context)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_gui/ros_plugin_provider.py", line 101, in load
    return class_ref(plugin_context)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_reconfigure/param_plugin.py", line 51, in __init__
    self._plugin_widget = ParamWidget(context)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_reconfigure/param_widget.py", line 105, in __init__
    self, rp, self.sig_sysmsg
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_reconfigure/node_selector_widget.py", line 102, in __init__
    self._update_nodetree_pernode()
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_reconfigure/node_selector_widget.py", line 341, in _update_nodetree_pernode
    TreenodeQstdItem.NODE_FULLPATH
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_reconfigure/treenode_qstditem.py", line 94, in __init__
    self._set_param_name(grn_current_treenode)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_reconfigure/treenode_qstditem.py", line 246, in _set_param_name
    self._toplevel_treenode_name = self._list_treenode_names[0]
IndexError: list index out of range

/edgetpu_object_detector/output/image is not published

When I use fetch15, /edgetpu_object_detector/output/image is not published.

fetch@fetch15:~/ros/melodic/src/jsk-ros-pkg/coral_usb_ros$ rostopic hz /edgetpu_object_detector/output/image
subscribed to [/edgetpu_object_detector/output/image]
no new messages
no new messages

EdgeTPU is recognized

fetch@fetch15:~/ros/melodic/src/jsk-ros-pkg/coral_usb_ros$ lsusb
Bus 005 Device 008: ID 18d1:9302 Google Inc. 
Bus 005 Device 004: ID 0bda:0411 Realtek Semiconductor Corp. 
Bus 005 Device 007: ID 8087:0b37 Intel Corp. 
Bus 005 Device 003: ID 18d1:9302 Google Inc. 
Bus 005 Device 002: ID 2109:0817 VIA Labs, Inc. 
Bus 005 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 004 Device 013: ID 2886:0018  
Bus 004 Device 011: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Bus 004 Device 009: ID 1130:1620 Tenx Technology, Inc. 
Bus 004 Device 006: ID 2109:2817 VIA Labs, Inc. 
Bus 004 Device 005: ID 2e1a:1000  
Bus 004 Device 004: ID 222a:004d  
Bus 004 Device 012: ID 8087:0aa7 Intel Corp. 
Bus 004 Device 010: ID 26ce:01a2  
Bus 004 Device 008: ID 0bda:5411 Realtek Semiconductor Corp. 
Bus 004 Device 002: ID 0d8c:0126 C-Media Electronics, Inc. 
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 1d27:0609 ASUS 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

The node manager is alive and there seems to be no error.

fetch@fetch15:~/ros/melodic/src/jsk-ros-pkg/coral_usb_ros$ rostopic info /edgetpu_object_detector/output/image
Type: sensor_msgs/Image

Publishers: 
 * /edgetpu_object_node_manager (http://fetch15:37505/)

Subscribers: None
fetch@fetch15:~/ros/melodic/src/jsk-ros-pkg/coral_usb_ros$ rosnode ping /edgetpu_object_node_manager
rosnode: node is [/edgetpu_object_node_manager]
pinging /edgetpu_object_node_manager with a timeout of 3.0s
xmlrpc reply from http://fetch15:37505/	time=0.869989ms
xmlrpc reply from http://fetch15:37505/	time=0.595093ms
fetch@fetch15:~/ros/melodic/src/jsk-ros-pkg/coral_usb_ros$ rosnode info /edgetpu_object_node_manager
--------------------------------------------------------------------------------
Node [/edgetpu_object_node_manager]
Publications: 
 * /diagnostics [diagnostic_msgs/DiagnosticArray]
 * /edgetpu_object_detector/output/class [jsk_recognition_msgs/ClassificationResult]
 * /edgetpu_object_detector/output/image [sensor_msgs/Image]
 * /edgetpu_object_detector/output/image/compressed [sensor_msgs/CompressedImage]
 * /edgetpu_object_detector/output/rects [jsk_recognition_msgs/RectArray]
 * /edgetpu_object_detector/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
 * /edgetpu_object_detector/parameter_updates [dynamic_reconfigure/Config]
 * /edgetpu_panorama_object_detector/output/class [jsk_recognition_msgs/ClassificationResult]
 * /edgetpu_panorama_object_detector/output/image [sensor_msgs/Image]
 * /edgetpu_panorama_object_detector/output/image/compressed [sensor_msgs/CompressedImage]
 * /edgetpu_panorama_object_detector/output/rects [jsk_recognition_msgs/RectArray]
 * /edgetpu_panorama_object_detector/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
 * /edgetpu_panorama_object_detector/parameter_updates [dynamic_reconfigure/Config]
 * /rosout [rosgraph_msgs/Log]

Subscriptions: 
 * /dual_fisheye_to_panorama/quater/output [sensor_msgs/Image]

Services: 
 * /edgetpu_object_detector/set_parameters
 * /edgetpu_object_node_manager/get_loggers
 * /edgetpu_object_node_manager/list
 * /edgetpu_object_node_manager/set_logger_level
 * /edgetpu_object_node_manager/start
 * /edgetpu_object_node_manager/stop
 * /edgetpu_panorama_object_detector/set_parameters


contacting node http://fetch15:37505/ ...
Pid: 15911
Connections:
 * topic: /rosout
    * to: /rosout
    * direction: outbound (37017 - 127.0.0.1:50484) [14]
    * transport: TCPROS
 * topic: /diagnostics
    * to: /diag_agg
    * direction: outbound (37017 - 127.0.0.1:51354) [16]
    * transport: TCPROS
 * topic: /edgetpu_panorama_object_detector/output/rects
    * to: /edgetpu_panorama_object_detection_rect_array_in_panorama_to_bounding_box_array
    * direction: outbound (37017 - 133.11.216.34:38024) [55]
    * transport: TCPROS
 * topic: /edgetpu_panorama_object_detector/output/class
    * to: /edgetpu_panorama_object_detection_rect_array_in_panorama_to_bounding_box_array
    * direction: outbound (37017 - 133.11.216.34:38022) [66]
    * transport: TCPROS
 * topic: /dual_fisheye_to_panorama/quater/output
    * to: /dual_fisheye_to_panorama/panorama_downsample_quater (http://fetch15:36483/)
    * direction: inbound
    * transport: TCPROS

On the other hand, /edgetpu_panorama_object_detector/output/image is published.

fetch@fetch15:~/ros/melodic/src/jsk-ros-pkg/coral_usb_ros$ rostopic hz /edgetpu_panorama_object_detector/output/image
subscribed to [/edgetpu_panorama_object_detector/output/image]
average rate: 10.585
	min: 0.057s max: 0.101s std dev: 0.01402s window: 9
average rate: 10.247
	min: 0.057s max: 0.101s std dev: 0.00975s window: 19

rviz support ?

hey,

does anyone know if it is possible to use this ros package coral_usb_ros together with rviz to display data from a LiDAR sensor on which object detection is performed?

thanks for any help and advice

rosrun jsk_perception image_publisher.py does not work (?)

I followed instruction and start

rosrun jsk_perception image_publisher.py _file_name:=$(rospack find jsk_perception)/sample/object_detection_example_1.jpg

and try to visualize the image by

 rosrun image_view image_view image:=/image_publisher/output
[ERROR] [1634453747.476164744]: Skipped loading plugin with error: XML Document '/opt/ros/noetic/share/prosilica_camera/plugins/nodelet_plugins.xml' has no Root Element. This likely means the XML is malformed or missing..
[ INFO] [1634453747.480691611]: Initializing nodelet with 12 worker threads.
[ INFO] [1634453747.555356635]: Using transport "compressed"

but it does not work. Using image_publisher works.

rosrun image_publisher image_publisher $(rospack find jsk_perception)/sample/object_detection_example_1.jpg __name:=image_publisher ~image_raw:=~output

This because I ran

rosrun image_view image_view image:=/edgetpu_object_detector/output/image _image_transport:=compressed

and it update /image_view/image_transport as follows

$ rosparam get /image_view/image_transport
compressed

but image_publishser.py does not support compressed format, to reset transport hint. Ran

rosrun image_view image_view  image:=/image_publisher/output _image_transport:=raw

Or wait for jsk-ros-pkg/jsk_recognition#2637

cc: @hi-kondo

Add some functions for own purposes

Hey @knorth55,

I finally reach the last step of my thesis and want to add some functions to the node, which I've found on other examples and from the pycoral API. So my approach is to implement the following: FPS counter (printed in window corner), execution time of the script and the detection results for documentation with pycoral.

the question is now can i just add it in the object_detector.py script or does it have to be added somewhere else in the node. that it is possible and has nothing directly to do with the rviz plug-ins i will assume.

Would be glad about a detailed answer, so that others can expand the node for their own purposes :)

FPS counter:

frame_rate_calc = 1
freq = cv2.getTickFrequency()
t1 = cv2.getTickCount()
cv2.putText(frame,'FPS: {0:.2f}'.format(frame_rate_calc),(30,50),cv2.FONT_HERSHEY_SIMPLEX,1,(255,255,0),2,cv2.LINE_AA)
t2 = cv2.getTickCount()
time1 = (t2-t1)/freq
frame_rate_calc= 1/time1

example execution time:

import time
start_time = time.time()
main()
print("--- %s seconds ---" % (time.time() - start_time))

get results from model:

pycoral.adapters.detect.get_objects(interpreter, score_threshold=- inf, image_scale=1.0, 1.0)
pycoral.adapters.detect.Object(id, score, bbox)

catkin_make instead of catkin build failed

Hey @knorth55 so I tried with the given instructions (Workspace build (Noetic)) and it works, the problem is that my LiDAR driver isn't happy (don't work) with catkin build and I could not solve the error (CMAKELISTS can't be build).

Screenshot from 2022-07-15 09-37-28

After adding the required folder

Screenshot from 2022-07-15 09-51-02

So I would like to know why, the node can't be build with catkin_make.

stuck at the ROS installation step

Hi, Shingo, amazing for beginner with coral usb or coral board.
Now I am using the coral board for autonomous vehicle, but I am stuck at the first step - install ROS on coral board, I followed the tutorial here "http://wiki.ros.org/Installation/UbuntuARM", but fails.
Could you please give me some hints about how to successfully install ROS on coral board, thank you very much!

Image augmentation for training

@knorth55 トレーニングデータをサーバに送る際に自動でデータオーギュメンテ―ションできたら便利だな,と思ったんだけど,すでにそういう機能があったりするかな?

  • 色の変換はAPCの時にいろいろやっていたからどっかにコードがありそう
  • 画像の拡大縮小は問題なくできるんだろうか?
  • 画像の回転は回転中心が重要だったりするのかな.

Cc: @MiyabiTane

noetic-jsk-perception failed

Hello!

I'm following the noetic installation instructions and am running into this error while building a docker image :
#17 1117.7 executing command [sudo -H apt-get install -y ros-noetic-jsk-perception]
#17 1117.7 executing command [sudo -H apt-get install -y ros-noetic-resource-retriever]
#17 1117.7 executing command [sudo -H apt-get install -y ros-noetic-catkin-virtualenv]
#17 1117.7 executing command [sudo -H apt-get install -y ros-noetic-cv-bridge]
#17 1117.7 executing command [sudo -H apt-get install -y ros-noetic-jsk-recognition-msgs]
#17 1117.7 executing command [sudo -H apt-get install -y ros-noetic-jsk-topic-tools]
#17 1117.7 ERROR: the following rosdeps failed to install
#17 1117.7 apt: command [sudo -H apt-get install -y ros-noetic-jsk-perception] failed
#17 1117.7 apt: Failed to detect successful installation of [ros-noetic-jsk-perception]

I have added a 'rosdep update' to your instructions since it was needed on my end since it was needed for my system to work:
cd ~/coral_ws/src/ &&
rosdep update -y &&
rosdep install --from-paths . --ignore-src -y -r && \

Dynamic reconfigure corrupted

When we change parameters from dynamic reconfigure, it corrupts.
Maybe we need to build dynamic_reconfigure in catkin_ws, but I haven't check it.

How to run demo

I tried to do this according to README.
It seemed that installing the Edge TPU runtime and the TensorFlow Lite interpreter(Melodic) succeeded(There weren't any errors).

However, I can't run insta360 air for panorama image though image_publisher and usb_cam is successfully running.

The error message is

RLException: [sample_insta360_air.launch] is neither a launch file in package [jsk_perception] nor is [jsk_perception] a launch file name
The traceback for the exception was written to the log file

In addition, Edge TPU launch files do not work.

source /opt/ros/melodic/setup.bash
source ~/coral_ws/devel/setup.bash
roslaunch coral_usb edgetpu_object_detector.launch INPUT_IMAGE:=/image_publisher/output

Even though I tried to run image view in normal workspace(not edge tpu workspace),it did not work.

How can I solve this issue?

ImportError: No module named '_edgetpu_cpp_wrapper'

I'm trying to install this node on the ElementaryOS derivative of Ubuntu 20:

Linux ElementaryOS 5.13.0-41-generic #46~20.04.1-Ubuntu SMP Wed Apr 20 13:16:21 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
with
ROS Noetic and Python 3.8.10 (system version)

When I try to launch the object detection node with:

roslaunch coral_usb edgetpu_object_detector.launch INPUT_IMAGE:=/usb_cam/image_raw

I get the following error about a missing python module. Any suggestions are appreciated.

Traceback (most recent call last):
File "/home/user/Development/coral_ws/src/coral_usb_ros/node_scripts/edgetpu_object_detector.py", line 5, in
from coral_usb.object_detector import EdgeTPUObjectDetector
File "/home/user/Development/coral_ws/src/coral_usb_ros/python/coral_usb/object_detector.py", line 6, in
from coral_usb.detector_base import EdgeTPUDetectorBase
File "/home/user/Development/coral_ws/src/coral_usb_ros/python/coral_usb/detector_base.py", line 45, in
from edgetpu.basic.edgetpu_utils import EDGE_TPU_STATE_ASSIGNED
File "/usr/local/lib/python3.8/dist-packages/edgetpu/basic/edgetpu_utils.py", line 15, in
import edgetpu.swig.edgetpu_cpp_wrapper as wrapper
File "/usr/local/lib/python3.8/dist-packages/edgetpu/swig/edgetpu_cpp_wrapper.py", line 28, in
_edgetpu_cpp_wrapper = swig_import_helper()
File "/usr/local/lib/python3.8/dist-packages/edgetpu/swig/edgetpu_cpp_wrapper.py", line 20, in swig_import_helper
import _edgetpu_cpp_wrapper
ModuleNotFoundError: No module named '_edgetpu_cpp_wrapper'

When I execute `catkin build`, the error was occurred at the first time.

I executed some commands and catkin build as your readme shows, it returned the error at the first time.

Errors     << coral_usb:make /home/tork/coral_ws/logs/coral_usb/build.make.000.log
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] 許可がありません: '/home/tork/.cache/pip/wheels/97/cc/70/f8b0783d465997368ed7b3a1196b9cde33c1eb32fdb3f2580a'
Consider using the `--user` option or check the permissions.

ERROR: Could not install packages due to an EnvironmentError: [Errno 13] 許可がありません: '/home/tork/.cache/pip/wheels/97/cc/70/f8b0783d465997368ed7b3a1196b9cde33c1eb32fdb3f2580a'
Consider using the `--user` option or check the permissions.

Error, clearing virtualenv and retrying: Command '['/home/tork/coral_ws/build/coral_usb/venv/bin/python', '-m', 'pip', 'install', '-qq', '-r', '/home/tork/coral_ws/build/coral_usb/generated_requirements.txt']' returned non-zero exit status 1
Error, clearing virtualenv and retrying: Command '['/home/tork/coral_ws/devel/.private/coral_usb/share/coral_usb/venv/bin/python', '-m', 'pip', 'install', '-qq', '-r', '/home/tork/coral_ws/build/coral_usb/generated_requirements.txt']' returned non-zero exit status 1
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] 許可がありません: '/home/tork/.cache/pip/wheels/97/cc/70/f8b0783d465997368ed7b3a1196b9cde33c1eb32fdb3f2580a'
Consider using the `--user` option or check the permissions.

Error, clearing virtualenv and retrying: Command '['/home/tork/coral_ws/build/coral_usb/venv/bin/python', '-m', 'pip', 'install', '-qq', '-r', '/home/tork/coral_ws/build/coral_usb/generated_requirements.txt']' returned non-zero exit status 1
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] 許可がありません: '/home/tork/.cache/pip/wheels/97/cc/70/f8b0783d465997368ed7b3a1196b9cde33c1eb32fdb3f2580a'
Consider using the `--user` option or check the permissions.

Error, clearing virtualenv and retrying: Command '['/home/tork/coral_ws/devel/.private/coral_usb/share/coral_usb/venv/bin/python', '-m', 'pip', 'install', '-qq', '-r', '/home/tork/coral_ws/build/coral_usb/generated_requirements.txt']' returned non-zero exit status 1
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] 許可がありません: '/home/tork/.cache/pip/wheels/97/cc/70/f8b0783d465997368ed7b3a1196b9cde33c1eb32fdb3f2580a'
Consider using the `--user` option or check the permissions.

Error, clearing virtualenv and retrying: Command '['/home/tork/coral_ws/build/coral_usb/venv/bin/python', '-m', 'pip', 'install', '-qq', '-r', '/home/tork/coral_ws/build/coral_usb/generated_requirements.txt']' returned non-zero exit status 1
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] 許可がありません: '/home/tork/.cache/pip/wheels/97/cc/70/f8b0783d465997368ed7b3a1196b9cde33c1eb32fdb3f2580a'
Consider using the `--user` option or check the permissions.

Error, clearing virtualenv and retrying: Command '['/home/tork/coral_ws/devel/.private/coral_usb/share/coral_usb/venv/bin/python', '-m', 'pip', 'install', '-qq', '-r', '/home/tork/coral_ws/build/coral_usb/generated_requirements.txt']' returned non-zero exit status 1
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] 許可がありません: '/home/tork/.cache/pip/wheels/97/cc/70/f8b0783d465997368ed7b3a1196b9cde33c1eb32fdb3f2580a'
Consider using the `--user` option or check the permissions.

Traceback (most recent call last):
  File "/opt/ros/melodic/lib/catkin_virtualenv/build_venv", line 101, in <module>
    deploy.install_dependencies()
  File "/opt/ros/melodic/lib/python2.7/dist-packages/dh_virtualenv/deployment.py", line 191, in install_dependencies
    check_call(self.pip('-r', requirements_path))
  File "/opt/ros/melodic/lib/python2.7/dist-packages/dh_virtualenv/deployment.py", line 39, in check_call
    return subprocess.check_call(cmd, *args, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/tork/coral_ws/build/coral_usb/venv/bin/python', '-m', 'pip', 'install', '-qq', '-r', '/home/tork/coral_ws/build/coral_usb/generated_requirements.txt']' returned non-zero exit status 1
make[2]: *** [venv] Error 1
make[2]: *** 未完了のジョブを待っています....
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] 許可がありません: '/home/tork/.cache/pip/wheels/97/cc/70/f8b0783d465997368ed7b3a1196b9cde33c1eb32fdb3f2580a'
Consider using the `--user` option or check the permissions.

Traceback (most recent call last):
  File "/opt/ros/melodic/lib/catkin_virtualenv/build_venv", line 101, in <module>
    deploy.install_dependencies()
  File "/opt/ros/melodic/lib/python2.7/dist-packages/dh_virtualenv/deployment.py", line 191, in install_dependencies
    check_call(self.pip('-r', requirements_path))
  File "/opt/ros/melodic/lib/python2.7/dist-packages/dh_virtualenv/deployment.py", line 39, in check_call
    return subprocess.check_call(cmd, *args, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/tork/coral_ws/devel/.private/coral_usb/share/coral_usb/venv/bin/python', '-m', 'pip', 'install', '-qq', '-r', '/home/tork/coral_ws/build/coral_usb/generated_requirements.txt']' returned non-zero exit status 1
make[2]: *** [/home/tork/coral_ws/devel/.private/coral_usb/share/coral_usb/venv] Error 1
make[1]: *** [CMakeFiles/coral_usb_generate_virtualenv.dir/all] Error 2
make: *** [all] Error 2
cd /home/tork/coral_ws/build/coral_usb; catkin build --get-env coral_usb | catkin env -si  /usr/bin/make --jobserver-fds=6,7 -j; cd -
...............................................................................
Failed     << coral_usb:make                         [ Exited with code 2 ]    
Failed    <<< coral_usb                              [ 40.9 seconds ]          
[build] Summary: 14 of 15 packages succeeded.                                  
[build]   Ignored:   2 packages were skipped or are blacklisted.               
[build]   Warnings:  2 packages succeeded with warnings.                       
[build]   Abandoned: None.                                                     
[build]   Failed:    1 packages failed.                                        
[build] Runtime: 2 minutes and 2.3 seconds total.                              
[build] Note: Workspace packages have changed, please re-source setup files to use them.

After this command, I executed catkin build again.

-------------------------------------------------------------------------------
Profile:                     default
Extending:          [cached] /opt/ros/melodic
Workspace:                   /home/tork/coral_ws
-------------------------------------------------------------------------------
Build Space:        [exists] /home/tork/coral_ws/build
Devel Space:        [exists] /home/tork/coral_ws/devel
Install Space:      [unused] /home/tork/coral_ws/install
Log Space:          [exists] /home/tork/coral_ws/logs
Source Space:       [exists] /home/tork/coral_ws/src
DESTDIR:            [unused] None
-------------------------------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        None
-------------------------------------------------------------------------------
Additional CMake Args:       -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/include/python3.6m -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.6m.so
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
-------------------------------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
-------------------------------------------------------------------------------
Workspace configuration appears valid.
-------------------------------------------------------------------------------
[build] Found '16' packages in 0.0 seconds.                                   
[build] Package table is up to date.                                          
Starting  >>> cv_bridge                                                       
Starting  >>> dynamic_reconfigure                                             
Starting  >>> image_geometry                                                  
Starting  >>> virtual_force_publisher                                         
Finished  <<< virtual_force_publisher                [ 0.1 seconds ]          
Finished  <<< dynamic_reconfigure                    [ 0.4 seconds ]          
Starting  >>> dynamic_tf_publisher                                            
Starting  >>> jsk_network_tools                                               
Starting  >>> jsk_tilt_laser                                                  
Finished  <<< cv_bridge                              [ 0.4 seconds ]          
Starting  >>> opencv_tests                                                    
Finished  <<< image_geometry                         [ 0.3 seconds ]          
Starting  >>> image_view2                                                     
Finished  <<< jsk_tilt_laser                         [ 0.2 seconds ]          
Finished  <<< dynamic_tf_publisher                   [ 0.4 seconds ]          
Finished  <<< opencv_tests                           [ 0.2 seconds ]          
Starting  >>> jsk_topic_tools                                                 
Finished  <<< jsk_network_tools                      [ 0.6 seconds ]          
Finished  <<< image_view2                            [ 0.4 seconds ]          
Finished  <<< jsk_topic_tools                        [ 0.4 seconds ]          
Starting  >>> jsk_data                                                        
Starting  >>> jsk_tools                                                       
Starting  >>> coral_usb                                                       
Finished  <<< jsk_tools                              [ 0.2 seconds ]          
Starting  >>> multi_map_server                                                
Finished  <<< coral_usb                              [ 0.2 seconds ]          
Finished  <<< jsk_data                               [ 0.2 seconds ]          
Finished  <<< multi_map_server                       [ 0.2 seconds ]          
[build] Summary: All 14 packages succeeded!                                   
[build]   Ignored:   2 packages were skipped or are blacklisted.              
[build]   Warnings:  None.                                                    
[build]   Abandoned: None.                                                    
[build]   Failed:    None.                                                    
[build] Runtime: 2.0 seconds total.

and it finished with no error. I don't know how important this error is, so I reported here just in case.

node publishes faster than receiving messages?

Hey,

I experienced the weird behaviour, that the topic /output/image is published faster than receiving the topic /sensor_msgs/Image. I thought the incoming message rate would specify how fast the image is published?
Any idea if it belongs to the node?

Input: Output
sensor/msgs_Image (every 2 sec.) -> coral usb node -> edgetpu_object_detector/output/image (every 0.5/1 sec.)

catkin build hangs

I'm trying to install this code under Ubuntu 20.04.4 LTS and ROS Noetic on a Raspberry Pi 4. When I get to the catkin build step the process always hangs at 84%. Any ideas? Thanks.

When I launch edgetpu_human_pose_estimator.launch, the python script returns SyntaxError.

I launched edgetpu_human_pose_estimator.launch, and terminal showed this error.

[edgetpu_human_pose_estimator-2] restarting process
process[edgetpu_human_pose_estimator-2]: started with pid [15649]
Traceback (most recent call last):
  File "/home/tork/coral_ws/src/coral_usb_ros/node_scripts/edgetpu_human_pose_estimator.py", line 16, in <module>
    from chainercv.visualizations import vis_point
  File "/usr/local/lib/python2.7/dist-packages/chainercv/__init__.py", line 3, in <module>
    from chainercv import chainer_experimental  # NOQA
  File "/usr/local/lib/python2.7/dist-packages/chainercv/chainer_experimental/__init__.py", line 1, in <module>
    from chainercv.chainer_experimental import datasets  # NOQA
  File "/usr/local/lib/python2.7/dist-packages/chainercv/chainer_experimental/datasets/__init__.py", line 1, in <module>
    from chainercv.chainer_experimental.datasets import sliceable  # NOQA
  File "/usr/local/lib/python2.7/dist-packages/chainercv/chainer_experimental/datasets/sliceable/__init__.py", line 1, in <module>
    from chainercv.chainer_experimental.datasets.sliceable.sliceable_dataset import SliceableDataset  # NOQA
  File "/usr/local/lib/python2.7/dist-packages/chainercv/chainer_experimental/datasets/sliceable/sliceable_dataset.py", line 5, in <module>
    import chainer
  File "/usr/local/lib/python2.7/dist-packages/chainer/__init__.py", line 10, in <module>
    from chainer import backends  # NOQA
  File "/usr/local/lib/python2.7/dist-packages/chainer/backends/__init__.py", line 1, in <module>
    from chainer.backends import cuda  # NOQA
  File "/usr/local/lib/python2.7/dist-packages/chainer/backends/cuda.py", line 77
    def shape(self) -> types.Shape:
                    ^
SyntaxError: invalid syntax
[edgetpu_human_pose_estimator-2] process has died [pid 15649, exit code 1, cmd /home/tork/coral_ws/devel/lib/coral_usb/edgetpu_human_pose_estimator.py ~input:=/image_publisher/output __name:=edgetpu_human_pose_estimator __log:=/home/tork/.ros/log/74102cae-ee6b-11ea-8bc9-c0b883e85b16/edgetpu_human_pose_estimator-2.log].
log file: /home/tork/.ros/log/74102cae-ee6b-11ea-8bc9-c0b883e85b16/edgetpu_human_pose_estimator-2*.log

I thought this script should be run on python3 environment, so I confirmed my environment by catkin config.

-------------------------------------------------------------------------------
Profile:                     default
Extending:          [cached] /opt/ros/melodic
Workspace:                   /home/tork/coral_ws
-------------------------------------------------------------------------------
Build Space:        [exists] /home/tork/coral_ws/build
Devel Space:        [exists] /home/tork/coral_ws/devel
Install Space:      [unused] /home/tork/coral_ws/install
Log Space:          [exists] /home/tork/coral_ws/logs
Source Space:       [exists] /home/tork/coral_ws/src
DESTDIR:            [unused] None
-------------------------------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        None
-------------------------------------------------------------------------------
Additional CMake Args:       -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/include/python3.6m -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.6m.so
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
-------------------------------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
-------------------------------------------------------------------------------
Workspace configuration appears valid.
-------------------------------------------------------------------------------

Please tell me how to fix this problem. Sorry for submitting 2 issues at the same time. I also show you the result of pip freeze | grep chainer. pip3 freeze | grep chainer returns nothing.

chainer==7.0.0
chainercv==0.13.1

Problems with jsk_common / travis building docker image

Hi,
first: Thanks a lot for this project.
I´m trying to build the docker image on a IOT2050 (ARM64) with a Coral TPU Chip (Mini PCIe Accelerator).
I changed some things in the Dockerfile

  • changed "FROM ..." to "FROM ros_melodic", cause of ARM64
  • added curl installation
  • changed tensorflow-lite whl to ..."aarch64"
  • changed tensorflow-lite whl to "cp37", because the ros:melodic brings python 3.6.9, and i updated it to 3.7.5

Dockerfile posted at the end.
I start building the docker image with

sudo docker build --build-arg ROS_DISTRO=melodic --build-arg UBUNTU_VERSION=bionic -t knorth55/coral_usb_ros:melodic-latest .

Using Docker version 19.03.12, build 48a6621

Now I have an issue with jsk_common and/or travis in fc.rosinstall, after

RUN cd ~ &&
mkdir -p ros/${ROS_DISTRO}/src &&
cd ros/${ROS_DISTRO}/src &&
wstool init &&
wstool set coral_usb_ros https://github.com/knorth55/coral_usb_ros.git -v master --git -y &&
wstool up -j 2 &&
wstool merge -y coral_usb_ros/fc.rosinstall &&
wstool merge -y coral_usb_ros/fc.rosinstall.${ROS_DISTRO} &&
wstool up -j 2

... and I´m not able to solve it. Can please someone help me?
Here is the output error:

[dynamic_reconfigure] Fetching https://github.com/ros/dynamic_reconfigure.git (version 1.6.3) to /root/ros/melodic/src/dynamic_reconfigure
[dynamic_reconfigure] Done.
[coral_usb_ros,dynamic_reconfigure] still active
[coral_usb_ros,dynamic_reconfigure] still active
Cloning into '/root/ros/melodic/src/jsk_common'...
Cloning into '/root/ros/melodic/src/vision_opencv'...
[vision_opencv] Fetching https://github.com/ros-perception/vision_opencv.git (version melodic) to /root/ros/melodic/src/vision_opencv
[vision_opencv] Done.
[jsk_common,vision_opencv] still active
[jsk_common,vision_opencv] still active
[jsk_common] still active
[jsk_common] still active
[...]
[jsk_common] still active
[jsk_common] still active
[jsk_common]WARNING [vcstools] Command failed: 'git submodule update --init --recursive'
run at: '/root/ros/melodic/src/jsk_common'
errcode: 1:
Submodule '.travis' (git://github.com/jsk-ros-pkg/jsk_travis) registered for path '.travis'
Cloning into '/root/ros/melodic/src/jsk_common/.travis'...
fatal: unable to connect to github.com:
github.com[0: 140.82.118.3]: errno=Connection timed out

fatal: clone of 'git://github.com/jsk-ros-pkg/jsk_travis' into submodule path '/root/ros/melodic/src/jsk_common/.travis' failed
Failed to clone '.travis'. Retry scheduled
Cloning into '/root/ros/melodic/src/jsk_common/.travis'...
fatal: unable to connect to github.com:
github.com[0: 140.82.118.3]: errno=Connection timed out

fatal: clone of 'git://github.com/jsk-ros-pkg/jsk_travis' into submodule path '/root/ros/melodic/src/jsk_common/.travis' failed
Failed to clone '.travis' a second time, aborting
[/vcstools]
[jsk_common] Fetching https://github.com/jsk-ros-pkg/jsk_common.git (version master) to /root/ros/melodic/src/jsk_common
still active
[jsk_common] still active
[jsk_common] still active
[...]
[jsk_common] still active
[jsk_common] still active
Exception caught during install: Error processing 'jsk_common' : [jsk_common] Checkout of https://github.com/jsk-ros-pkg/jsk_common.git version master into /root/ros/melodic/src/jsk_common failed.

ERROR in config: Error processing 'jsk_common' : [jsk_common] Checkout of https://github.com/jsk-ros-pkg/jsk_common.git version master into /root/ros/melodic/src/jsk_common failed.

The command '/bin/sh -c cd ~ && mkdir -p ros/${ROS_DISTRO}/src && cd ros/${ROS_DISTRO}/src && wstool init && wstool set coral_usb_ros https://github.com/knorth55/coral_usb_ros.git -v master --git -y && wstool up -j 2 && wstool merge -y coral_usb_ros/fc.rosinstall && wstool merge -y coral_usb_ros/fc.rosinstall.${ROS_DISTRO} && wstool up -j 2' returned a non-zero code: 1

Dockerfile:

ARG ROS_DISTRO
ARG UBUNTU_VERSION
FROM ros:melodic
ENV DEBIAN_FRONTEND noninteractive

RUN python3 --version
RUN apt-get update -y &&
apt-get install -y python3.7

RUN rm /usr/bin/python3
RUN sudo ln -s python3.7 /usr/bin/python3

RUN python3 --version

RUN echo "deb http://packages.ros.org/ros-testing/ubuntu $(lsb_release -sc) main" &gt; /etc/apt/sources.list.d/ros-la$
RUN apt-get update && apt-get install -y wget git
RUN wget http://packages.ros.org/ros.key -O - | apt-key add -

FIXME: start-jsk/jsk_apc#2664

RUN apt-get update && apt-get dist-upgrade -y && apt-get install -y
apt-utils
python-catkin-tools
python-rosdep
python-setuptools
python-wstool
python-pip

RUN pip install 'pip==9.0.3' &&
pip install 'setuptools==44.1.0'

RUN apt-get update &&
apt-get install curl

RUN apt-get update &&
apt-get install -y apt-transport-https ca-certificates &&
echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" | tee /etc/apt/sources.list.d/coral$
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - &&
apt-get update &&
apt-get install -y libedgetpu1-std python3-edgetpu python3-pip

ARG ROS_DISTRO
RUN if [ ${ROS_DISTRO} = "kinetic" ]; then
wget https://dl.google.com/coral/python/tflite_runtime-1.14.0-cp35-cp35m-linux_aarch64.whl &&
pip3 install tflite_runtime-1.14.0-cp35-cp35m-linux_aarch64.whl;
else
wget https://dl.google.com/coral/python/tflite_runtime-1.14.0-cp37-cp37m-linux_aarch64.whl &&
pip3 install tflite_runtime-1.14.0-cp37-cp37m-linux_aarch64.whl;
fi

ARG ROS_DISTRO
RUN cd ~ &&
mkdir -p ros/${ROS_DISTRO}/src &&
cd ros/${ROS_DISTRO}/src &&
wstool init &&
wstool set coral_usb_ros https://github.com/knorth55/coral_usb_ros.git -v master --git -y &&
wstool up -j 2 &&
wstool merge -y coral_usb_ros/fc.rosinstall &&
wstool merge -y coral_usb_ros/fc.rosinstall.${ROS_DISTRO} &&
wstool up -j 2

RUN rosdep update --include-eol-distros

/opt/ros/${ROS_DISTRO}/share can be changed after rosdep install, so we run it 3 times.

RUN apt-get update &&
for i in $(seq 3); do
rosdep install --rosdistro ${ROS_DISTRO} -r -y -i --from-paths /opt/ros/${ROS_DISTRO}/share ~/ros/${ROS_DIST$
done

ARG ROS_DISTRO
RUN . /opt/ros/${ROS_DISTRO}/setup.sh &&
cd ~/ros/${ROS_DISTRO} &&
if [ ${ROS_DISTRO} = "kinetic" ] ; then
catkin config -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/include/python3.5m -DPYTHON_LIB$
else
catkin config -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/include/python3.6m -DPYTHON_LIB$
fi &&
catkin build

Cannot build a workspace on README.md

I had tried to build the package following the instruction in README.md, but "catkin build" command had failed because "catkin_pkg" was not found during "catkin_tools_prebuild" process.

sktometometo@Sherman ~/ros/ws_tpu_development/src [gitbranch:] [workspace:] ->
 06:28 午後 日  9月 15$ catkin clean

[clean] Warning: This will completely remove the following directories. (Use `--yes` to skip this check)
[clean] Log Space:     /home/sktometometo/ros/ws_tpu_development/logs
[clean] Build Space:   /home/sktometometo/ros/ws_tpu_development/build
[clean] Devel Space:   /home/sktometometo/ros/ws_tpu_development/devel

[clean] Are you sure you want to completely remove the directories listed above? [yN]: y
[clean] Removing develspace: /home/sktometometo/ros/ws_tpu_development/devel
[clean] Removing buildspace: /home/sktometometo/ros/ws_tpu_development/build
[clean] Removing log space: /home/sktometometo/ros/ws_tpu_development/logs
sktometometo@Sherman ~/ros/ws_tpu_development/src [gitbranch:] [workspace:] ->
 06:28 午後 日  9月 15$ cd ..
sktometometo@Sherman ~/ros/ws_tpu_development [gitbranch:] [workspace:] ->
 06:28 午後 日  9月 15$ ls
src
sktometometo@Sherman ~/ros/ws_tpu_development [gitbranch:] [workspace:] ->
 06:28 午後 日  9月 15$ ls -a
.  ..  .catkin_tools  src
sktometometo@Sherman ~/ros/ws_tpu_development [gitbranch:] [workspace:] ->
 06:28 午後 日  9月 15$ rm -rf .catkin_tools/
sktometometo@Sherman ~/ros/ws_tpu_development [gitbranch:] [workspace:] ->
 06:28 午後 日  9月 15$ catkin init
Initializing catkin workspace in `/home/sktometometo/ros/ws_tpu_development`.
------------------------------------------------------------------------------
Profile:                     default
Extending:             [env] /opt/ros/kinetic
Workspace:                   /home/sktometometo/ros/ws_tpu_development
------------------------------------------------------------------------------
Build Space:       [missing] /home/sktometometo/ros/ws_tpu_development/build
Devel Space:       [missing] /home/sktometometo/ros/ws_tpu_development/devel
Install Space:      [unused] /home/sktometometo/ros/ws_tpu_development/install
Log Space:         [missing] /home/sktometometo/ros/ws_tpu_development/logs
Source Space:       [exists] /home/sktometometo/ros/ws_tpu_development/src
DESTDIR:            [unused] None
------------------------------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        None
------------------------------------------------------------------------------
Additional CMake Args:       None
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
------------------------------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
------------------------------------------------------------------------------
Workspace configuration appears valid.
------------------------------------------------------------------------------
sktometometo@Sherman ~/ros/ws_tpu_development [gitbranch:] [workspace:] ->
 06:28 午後 日  9月 15$ catkin config -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/include/python3.5m -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.5m.so
---------------------------------------------------------------------------------------------------------
Profile:                     default
Extending:             [env] /opt/ros/kinetic
Workspace:                   /home/sktometometo/ros/ws_tpu_development
---------------------------------------------------------------------------------------------------------
Build Space:       [missing] /home/sktometometo/ros/ws_tpu_development/build
Devel Space:       [missing] /home/sktometometo/ros/ws_tpu_development/devel
Install Space:      [unused] /home/sktometometo/ros/ws_tpu_development/install
Log Space:         [missing] /home/sktometometo/ros/ws_tpu_development/logs
Source Space:       [exists] /home/sktometometo/ros/ws_tpu_development/src
DESTDIR:            [unused] None
---------------------------------------------------------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        None
---------------------------------------------------------------------------------------------------------
Additional CMake Args:       -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/include/python3.5m -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.5m.so
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
---------------------------------------------------------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
---------------------------------------------------------------------------------------------------------
Workspace configuration appears valid.
---------------------------------------------------------------------------------------------------------
sktometometo@Sherman ~/ros/ws_tpu_development [gitbranch:] [workspace:] ->
 06:28 午後 日  9月 15$ catkin build --this
[build] Error: In order to use --this, the current directory must be part of a catkin package.
sktometometo@Sherman ~/ros/ws_tpu_development [gitbranch:] [workspace:] ->
 06:28 午後 日  9月 15$ catkin build
---------------------------------------------------------------------------------------------------------
Profile:                     default
Extending:             [env] /opt/ros/kinetic
Workspace:                   /home/sktometometo/ros/ws_tpu_development
---------------------------------------------------------------------------------------------------------
Build Space:        [exists] /home/sktometometo/ros/ws_tpu_development/build
Devel Space:        [exists] /home/sktometometo/ros/ws_tpu_development/devel
Install Space:      [unused] /home/sktometometo/ros/ws_tpu_development/install
Log Space:         [missing] /home/sktometometo/ros/ws_tpu_development/logs
Source Space:       [exists] /home/sktometometo/ros/ws_tpu_development/src
DESTDIR:            [unused] None
---------------------------------------------------------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        None
---------------------------------------------------------------------------------------------------------
Additional CMake Args:       -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/include/python3.5m -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.5m.so
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
---------------------------------------------------------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
---------------------------------------------------------------------------------------------------------
Workspace configuration appears valid.

NOTE: Forcing CMake to run for each package.
---------------------------------------------------------------------------------------------------------
[build] Found '10' packages in 0.0 seconds.                                                             
[build] Updating package table.                                                                         
Starting  >>> catkin_tools_prebuild                                                                     
________________________________________________________________________________________________________
Errors     << catkin_tools_prebuild:cmake /home/sktometometo/ros/ws_tpu_development/logs/catkin_tools_prebuild/build.cmake.000.log
ImportError: "from catkin_pkg.package import parse_package" failed: No module named 'catkin_pkg'
Make sure that you have installed "catkin_pkg", it is up to date and on the PYTHONPATH.
CMake Error at /opt/ros/kinetic/share/catkin/cmake/safe_execute_process.cmake:11 (message):
  execute_process(/usr/bin/python3
  "/opt/ros/kinetic/share/catkin/cmake/parse_package_xml.py"
  "/opt/ros/kinetic/share/catkin/cmake/../package.xml"
  "/home/sktometometo/ros/ws_tpu_development/build/catkin_tools_prebuild/catkin/catkin_generated/version/package.cmake")
  returned error code 1
Call Stack (most recent call first):
  /opt/ros/kinetic/share/catkin/cmake/catkin_package_xml.cmake:74 (safe_execute_process)
  /opt/ros/kinetic/share/catkin/cmake/all.cmake:167 (_catkin_package_xml)
  /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:20 (include)
  CMakeLists.txt:4 (find_package)


cd /home/sktometometo/ros/ws_tpu_development/build/catkin_tools_prebuild; catkin build --get-env catkin_tools_prebuild | catkin env -si  /usr/bin/cmake /home/sktometometo/ros/ws_tpu_development/build/catkin_tools_prebuild --no-warn-unused-cli -DCATKIN_DEVEL_PREFIX=/home/sktometometo/ros/ws_tpu_development/devel/.private/catkin_tools_prebuild -DCMAKE_INSTALL_PREFIX=/home/sktometometo/ros/ws_tpu_development/install -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/include/python3.5m -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.5m.so; cd -
........................................................................................................
Failed     << catkin_tools_prebuild:cmake                        [ Exited with code 1 ]                 
Failed    <<< catkin_tools_prebuild                              [ 1.4 seconds ]                        
Abandoned <<< catkin_virtualenv                                  [ Unrelated job failed ]               
Abandoned <<< cv_bridge                                          [ Unrelated job failed ]               
Abandoned <<< coral_usb                                          [ Unrelated job failed ]               
Abandoned <<< image_geometry                                     [ Unrelated job failed ]               
Abandoned <<< opencv_tests                                       [ Unrelated job failed ]               
Abandoned <<< test_catkin_virtualenv                             [ Unrelated job failed ]               
Abandoned <<< test_catkin_virtualenv_inherited                   [ Unrelated job failed ]               
Abandoned <<< test_catkin_virtualenv_py3                         [ Unrelated job failed ]               
Abandoned <<< test_catkin_virtualenv_py3_isolated                [ Unrelated job failed ]               
[build] Summary: 0 of 10 packages succeeded.                                                            
[build]   Ignored:   1 packages were skipped or are blacklisted.                                        
[build]   Warnings:  None.                                                                              
[build]   Abandoned: 9 packages were abandoned.                                                         
[build]   Failed:    1 packages failed.                                                                 
[build] Runtime: 1.5 seconds total.    

I suspect that this is because python3-catkin-pkg package is not installed in my computer and python3 environment in my pc cannot use catkin_pkg python module, but the python3-catkin-pkg debian package for ubuntu conflicts with python-catkin-pkg, and if I install python3-catkin-pkg package to my pc, my ROS environment will break.

sktometometo@Sherman ~ [gitbranch:] [workspace:] ->
 06:45 PM Sun Sep 15$ apt show python3-catkin-pkg
Package: python3-catkin-pkg
Version: 0.4.13-100
Priority: optional
Section: python
Maintainer: Dirk Thomas <[email protected]>
Installed-Size: 25.6 kB
Depends: python3-dateutil, python3-docutils, python3-pyparsing, python3:any (>= 3.4~), python3-catkin-pkg-modules (>= 0.4.13)
Conflicts: catkin, python-catkin-pkg
Homepage: http://wiki.ros.org/catkin_pkg
Download-Size: 3508 B
APT-Sources: http://packages.ros.org/ros/ubuntu xenial/main amd64 Packages
Description: catkin package library
 Library for retrieving information about catkin packages.

sktometometo@Sherman ~ [gitbranch:] [workspace:] ->
 06:45 PM Sun Sep 15$ sudo apt install python3-catkin-pkg
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  festival festlex-cmu festlex-poslex festvox-kallpc16k fltk1.3-doc fluid gazebo7 gazebo7-common
  gazebo7-plugin-base google-mock hddtemp hdf5-helpers libaec-dev libapr1-dev libaprutil1-dev
  libarmadillo6 libarpack2 libassimp-dev libassimp3v5 libbullet-dev libbulletcollision2.83.6
  libbulletdynamics2.83.6 libbulletsoftbody2.83.6 libbz2-dev libcollada-dom2.4-dp-dev
  libcollada-dom2.4-dp0 libconsole-bridge-dev libconsole-bridge0.2v5 libcurl4-openssl-dev libdap-dev
  libdap17v5 libdapclient6v5 libdapserver7v5 libepsilon1 libestools2.4 libflann-dev libflann1.8
  libfltk-cairo1.3 libfltk-forms1.3 libfltk-gl1.3 libfltk-images1.3 libfltk1.3 libfltk1.3-dev
  libfreeimage-dev libfreexl1 libgazebo7 libgazebo7-dev libgdal-dev libgdal1i libgeos-3.5.0
  libgeos-c1v5 libgeos-dev libgif-dev libgl2ps-dev libgl2ps0 libgles2-mesa-dev libgtest-dev
  libgts-0.7-5 libgts-bin libgts-dev libhdf4-0-alt libhdf4-alt-dev libhdf5-cpp-11 libhdf5-dev
  libhdf5-mpi-dev libhdf5-openmpi-10 libhdf5-openmpi-dev libignition-math2 libignition-math2-dev
  libinput-dev libjsoncpp-dev libkmlbase1 libkmldom1 libkmlengine1 libldap2-dev liblinearmath2.83.6
  liblog4cxx-dev liblog4cxx10-dev liblog4cxx10v5 liblz4-dev libminizip1 libnetcdf-c++4
  libnetcdf-cxx-legacy-dev libnetcdf-dev libnetcdf11 libogdi3.2 libogg-dev libogre-1.9-dev
  libogre-1.9.0v5 libopenni-dev libopenni-sensor-pointclouds0 libopenni0 libopenni2-0 libopenni2-dev
  libpcl-apps1.7 libpcl-common1.7 libpcl-dev libpcl-features1.7 libpcl-filters1.7 libpcl-io1.7
  libpcl-kdtree1.7 libpcl-keypoints1.7 libpcl-octree1.7 libpcl-outofcore1.7 libpcl-people1.7
  libpcl-recognition1.7 libpcl-registration1.7 libpcl-sample-consensus1.7 libpcl-search1.7
  libpcl-segmentation1.7 libpcl-surface1.7 libpcl-tracking1.7 libpcl-visualization1.7 libpcl1.7
  libpoco-dev libpococrypto9v5 libpocodata9v5 libpocofoundation9v5 libpocomysql9v5 libpoconet9v5
  libpoconetssl9v5 libpocoodbc9v5 libpocosqlite9v5 libpocoutil9v5 libpocoxml9v5 libpocozip9v5 libproj9
  libpyside-py3-2.0 libpyside2-dev libpyside2.0 libqgsttools-p1 libqhull-dev libqhull7 libqt5clucene5
  libqt5concurrent5 libqt5designer5 libqt5designercomponents5 libqt5help5 libqt5multimediaquick-p5
  libqt5multimediawidgets5 libqt5opengl5-dev libqt5quickparticles5 libqt5quickwidgets5 libqt5script5
  libqt5scripttools5 libqt5svg5-dev libqt5webkit5-dev libqt5x11extras5-dev libqt5xmlpatterns5
  libqt5xmlpatterns5-dev libqt5xmlpatterns5-private-dev libqtwebkit-dev libsctp-dev libsctp1
  libsdformat4 libsdformat4-dev libshiboken-py3-2.0 libshiboken2-dev libshiboken2.0 libsimbody-dev
  libsimbody3.5v5 libspatialite-dev libspatialite7 libspnav0 libsuperlu4 libtar-dev libtar0 libtbb-dev
  libtheora-dev libtinyxml-dev libtinyxml2-2v5 libtinyxml2-dev libudev-dev liburdfdom-dev
  liburdfdom-headers-dev liburdfdom-model-state0.4 liburdfdom-model0.4 liburdfdom-sensor0.4
  liburdfdom-tools liburdfdom-world0.4 liburiparser1 libusb-1.0-0-dev libusb-1.0-doc libvtk6-dev
  libvtk6-java libvtk6-qt-dev libvtk6.2 libvtk6.2-qt libxerces-c-dev libxerces-c3.1 libxss-dev
  libyaml-cpp-dev libyaml-cpp0.5v5 openni-utils proj-bin proj-data pyqt5-dev python-attr
  python-autobahn python-catkin-pkg-modules python-concurrent.futures python-defusedxml python-empy
  python-lz4 python-mpi4py python-msgpack python-netifaces python-opengl python-osrf-pycommon
  python-pam python-psutil python-pyasn1-modules python-pydot python-pyqt5 python-pyqt5.qtopengl
  python-pyqt5.qtsvg python-pyqt5.qtwebkit python-pyside2 python-pyside2.qtconcurrent
  python-pyside2.qtcore python-pyside2.qtgui python-pyside2.qthelp python-pyside2.qtnetwork
  python-pyside2.qtprintsupport python-pyside2.qtqml python-pyside2.qtquick
  python-pyside2.qtquickwidgets python-pyside2.qtscript python-pyside2.qtsql python-pyside2.qtsvg
  python-pyside2.qttest python-pyside2.qtuitools python-pyside2.qtwebkit python-pyside2.qtwebkitwidgets
  python-pyside2.qtwidgets python-pyside2.qtx11extras python-pyside2.qtxml python-rosdistro
  python-rosdistro-modules python-rospkg python-rospkg-modules python-serial python-service-identity
  python-sip-dev python-snappy python-trollius python-twisted python-twisted-bin python-twisted-core
  python-txaio python-vtk6 python-wxtools qt5-qmake qtbase5-dev qtbase5-dev-tools qtbase5-private-dev
  qtdeclarative5-dev qtdeclarative5-private-dev qtmultimedia5-dev qtscript5-dev qtscript5-private-dev
  qttools5-dev qttools5-dev-tools qttools5-private-dev ros-kinetic-angles ros-kinetic-class-loader
  ros-kinetic-cmake-modules ros-kinetic-cpp-common ros-kinetic-eigen-stl-containers
  ros-kinetic-gazebo-dev ros-kinetic-gl-dependency ros-kinetic-libcmt ros-kinetic-libsiftfast
  ros-kinetic-media-export ros-kinetic-python-qt-binding ros-kinetic-qt-dotgraph ros-kinetic-qt-gui
  ros-kinetic-qt-gui-py-common ros-kinetic-qwt-dependency ros-kinetic-random-numbers
  ros-kinetic-ros-environment ros-kinetic-rosbag-migration-rule ros-kinetic-rosbag-storage
  ros-kinetic-rosboost-cfg ros-kinetic-rosclean ros-kinetic-roscpp-core
  ros-kinetic-roscpp-serialization ros-kinetic-roscpp-traits ros-kinetic-rosgraph ros-kinetic-roslint
  ros-kinetic-roslz4 ros-kinetic-rosmaster ros-kinetic-rosparam ros-kinetic-rostime ros-kinetic-smclib
  ros-kinetic-urdf-parser-plugin ros-kinetic-webkit-dependency ros-kinetic-xmlrpcpp sbcl sdformat-sdf
  shiboken2 sip-dev spacenavd tango-icon-theme tcl-dev tcl-vtk6 tcl8.6-dev tk-dev tk8.6-dev
  ttf-dejavu-core uuid-dev vtk6 x11proto-scrnsaver-dev
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  python3-catkin-pkg-modules
The following packages will be REMOVED:
  python-catkin-pkg python-catkin-tools python-rosdep ros-kinetic-actionlib ros-kinetic-actionlib-msgs
  ros-kinetic-actionlib-tutorials ros-kinetic-audio-common-msgs ros-kinetic-bond ros-kinetic-bond-core
  ros-kinetic-bondcpp ros-kinetic-bondpy ros-kinetic-camera-calibration
  ros-kinetic-camera-calibration-parsers ros-kinetic-camera-info-manager ros-kinetic-catkin
  ros-kinetic-collada-parser ros-kinetic-collada-urdf ros-kinetic-common-msgs
  ros-kinetic-common-tutorials ros-kinetic-compressed-depth-image-transport
  ros-kinetic-compressed-image-transport ros-kinetic-control-msgs ros-kinetic-cv-bridge
  ros-kinetic-depth-image-proc ros-kinetic-desktop ros-kinetic-desktop-full
  ros-kinetic-diagnostic-aggregator ros-kinetic-diagnostic-analysis
  ros-kinetic-diagnostic-common-diagnostics ros-kinetic-diagnostic-msgs ros-kinetic-diagnostic-updater
  ros-kinetic-diagnostics ros-kinetic-dynamic-reconfigure ros-kinetic-dynamic-tf-publisher
  ros-kinetic-eigen-conversions ros-kinetic-executive-smach ros-kinetic-filters ros-kinetic-gazebo-msgs
  ros-kinetic-gazebo-plugins ros-kinetic-gazebo-ros ros-kinetic-gazebo-ros-pkgs ros-kinetic-gencpp
  ros-kinetic-geneus ros-kinetic-genlisp ros-kinetic-genmsg ros-kinetic-gennodejs ros-kinetic-genpy
  ros-kinetic-geometric-shapes ros-kinetic-geometry ros-kinetic-geometry-msgs
  ros-kinetic-geometry-tutorials ros-kinetic-image-common ros-kinetic-image-geometry
  ros-kinetic-image-pipeline ros-kinetic-image-proc ros-kinetic-image-publisher
  ros-kinetic-image-rotate ros-kinetic-image-transport ros-kinetic-image-transport-plugins
  ros-kinetic-image-view ros-kinetic-image-view2 ros-kinetic-imagesift
  ros-kinetic-interactive-marker-tutorials ros-kinetic-interactive-markers
  ros-kinetic-joint-state-publisher ros-kinetic-jsk-data ros-kinetic-jsk-footstep-msgs
  ros-kinetic-jsk-gui-msgs ros-kinetic-jsk-perception ros-kinetic-jsk-recognition-msgs
  ros-kinetic-jsk-recognition-utils ros-kinetic-jsk-topic-tools ros-kinetic-kdl-conversions
  ros-kinetic-kdl-parser ros-kinetic-laser-assembler ros-kinetic-laser-filters
  ros-kinetic-laser-geometry ros-kinetic-laser-pipeline ros-kinetic-librviz-tutorial
  ros-kinetic-map-msgs ros-kinetic-message-filters ros-kinetic-message-generation
  ros-kinetic-message-runtime ros-kinetic-mk ros-kinetic-nav-msgs ros-kinetic-nodelet
  ros-kinetic-nodelet-core ros-kinetic-nodelet-topic-tools ros-kinetic-nodelet-tutorial-math
  ros-kinetic-octomap ros-kinetic-opencv-apps ros-kinetic-opencv3 ros-kinetic-openni-camera
  ros-kinetic-openni-launch ros-kinetic-openni2-camera ros-kinetic-openni2-launch
  ros-kinetic-orocos-kdl ros-kinetic-pcl-conversions ros-kinetic-pcl-msgs ros-kinetic-pcl-ros
  ros-kinetic-perception ros-kinetic-perception-pcl ros-kinetic-pluginlib
  ros-kinetic-pluginlib-tutorials ros-kinetic-polled-camera ros-kinetic-posedetection-msgs
  ros-kinetic-pr2-description ros-kinetic-python-orocos-kdl ros-kinetic-qt-gui-cpp
  ros-kinetic-resource-retriever ros-kinetic-rgbd-launch ros-kinetic-robot ros-kinetic-robot-model
  ros-kinetic-robot-self-filter ros-kinetic-robot-state-publisher ros-kinetic-ros ros-kinetic-ros-base
  ros-kinetic-ros-comm ros-kinetic-ros-core ros-kinetic-ros-tutorials ros-kinetic-rosbag
  ros-kinetic-rosbash ros-kinetic-rosbuild ros-kinetic-rosconsole ros-kinetic-rosconsole-bridge
  ros-kinetic-roscpp ros-kinetic-roscpp-tutorials ros-kinetic-roscreate ros-kinetic-roseus
  ros-kinetic-rosgraph-msgs ros-kinetic-roslang ros-kinetic-roslaunch ros-kinetic-roslib
  ros-kinetic-roslisp ros-kinetic-rosmake ros-kinetic-rosmsg ros-kinetic-rosnode ros-kinetic-rosout
  ros-kinetic-rospack ros-kinetic-rospy ros-kinetic-rospy-tutorials ros-kinetic-rosservice
  ros-kinetic-rostest ros-kinetic-rostopic ros-kinetic-rosunit ros-kinetic-roswtf
  ros-kinetic-rqt-action ros-kinetic-rqt-bag ros-kinetic-rqt-bag-plugins ros-kinetic-rqt-common-plugins
  ros-kinetic-rqt-console ros-kinetic-rqt-dep ros-kinetic-rqt-graph ros-kinetic-rqt-gui
  ros-kinetic-rqt-gui-cpp ros-kinetic-rqt-gui-py ros-kinetic-rqt-image-view ros-kinetic-rqt-launch
  ros-kinetic-rqt-logger-level ros-kinetic-rqt-moveit ros-kinetic-rqt-msg ros-kinetic-rqt-nav-view
  ros-kinetic-rqt-plot ros-kinetic-rqt-pose-view ros-kinetic-rqt-publisher ros-kinetic-rqt-py-common
  ros-kinetic-rqt-py-console ros-kinetic-rqt-reconfigure ros-kinetic-rqt-robot-dashboard
  ros-kinetic-rqt-robot-monitor ros-kinetic-rqt-robot-plugins ros-kinetic-rqt-robot-steering
  ros-kinetic-rqt-runtime-monitor ros-kinetic-rqt-rviz ros-kinetic-rqt-service-caller
  ros-kinetic-rqt-shell ros-kinetic-rqt-srv ros-kinetic-rqt-tf-tree ros-kinetic-rqt-top
  ros-kinetic-rqt-topic ros-kinetic-rqt-web ros-kinetic-rviz ros-kinetic-rviz-plugin-tutorials
  ros-kinetic-rviz-python-tutorial ros-kinetic-self-test ros-kinetic-sensor-msgs ros-kinetic-shape-msgs
  ros-kinetic-simulators ros-kinetic-smach-msgs ros-kinetic-smach-ros ros-kinetic-sound-play
  ros-kinetic-stage ros-kinetic-stage-ros ros-kinetic-std-msgs ros-kinetic-std-srvs
  ros-kinetic-stereo-image-proc ros-kinetic-stereo-msgs ros-kinetic-tf ros-kinetic-tf-conversions
  ros-kinetic-tf2 ros-kinetic-tf2-eigen ros-kinetic-tf2-geometry-msgs ros-kinetic-tf2-kdl
  ros-kinetic-tf2-msgs ros-kinetic-tf2-py ros-kinetic-tf2-ros ros-kinetic-theora-image-transport
  ros-kinetic-topic-tools ros-kinetic-trajectory-msgs ros-kinetic-turtle-actionlib
  ros-kinetic-turtle-tf ros-kinetic-turtle-tf2 ros-kinetic-turtlesim ros-kinetic-urdf
  ros-kinetic-urdf-tutorial ros-kinetic-vision-opencv ros-kinetic-visualization-marker-tutorials
  ros-kinetic-visualization-msgs ros-kinetic-visualization-tutorials ros-kinetic-viz ros-kinetic-xacro
The following NEW packages will be installed:
  python3-catkin-pkg python3-catkin-pkg-modules
0 upgraded, 2 newly installed, 221 to remove and 3 not upgraded.
Need to get 0 B/44.8 kB of archives.
After this operation, 389 MB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.

Is there any way to build this package? Should I build python3-catkin-pkg from source?

Tuple index out of range

I tried to run the launch file named ''edgetpu_object_detector.launch" by following processes,

# terminal 1
$ roscore

# terminal 2
$ source /opt/ros/melodic/setup.bash
$ rosrun usb_cam usb_cam_node

# terminal 3
$ source /opt/ros/${ROS_DISTRO}/setup.bash
$ source ~/coral_ws/devel/setup.bash
$ roslaunch coral_usb edgetpu_object_detector.launch INPUT_IMAGE:=/usb_cam/image_raw

and I got this error

SUMMARY
========

PARAMETERS
 * /edgetpu_object_detector/device_id: 0
 * /edgetpu_object_detector/image_transport: raw
 * /edgetpu_object_detector/label_file: /home/mech-user/c...
 * /edgetpu_object_detector/model_file: /home/mech-user/c...
 * /rosdistro: melodic
 * /rosversion: 1.14.12

NODES
  /
    edgetpu_object_detector (coral_usb/edgetpu_object_detector.py)

ROS_MASTER_URI=http://localhost:11311

process[edgetpu_object_detector-1]: started with pid [21442]
[INFO] [1637505613.824623]: Using transport raw
Traceback (most recent call last):
  File "/home/mech-user/coral_ws/src/coral_usb_ros/node_scripts/edgetpu_object_detector.py", line 10, in <module>
    detector = EdgeTPUObjectDetector()
  File "/home/mech-user/coral_ws/src/coral_usb_ros/python/coral_usb/object_detector.py", line 11, in __init__
    super(EdgeTPUObjectDetector, self).__init__(None, None, namespace)
  File "/home/mech-user/coral_ws/src/coral_usb_ros/python/coral_usb/detector_base.py", line 68, in __init__
    device_path = ListEdgeTpuPaths(EDGE_TPU_STATE_NONE)[device_id]
IndexError: tuple index out of range
[edgetpu_object_detector-1] process has died [pid 21442, exit code 1, cmd /home/mech-user/coral_ws/devel/lib/coral_usb/edgetpu_object_detector.py ~input:=/usb_cam/image_raw __name:=edgetpu_object_detector __log:=/home/mech-user/.ros/log/ece972ba-4ad7-11ec-b47e-2079185f7c3d/edgetpu_object_detector-1.log].
log file: /home/mech-user/.ros/log/ece972ba-4ad7-11ec-b47e-2079185f7c3d/edgetpu_object_detector-1*.log

Could anyone can help me?

dynamic reconfigure in ROS noetic - missing import

Hey,

After I installed EdgeTPU, tflite_runtime etc. My IDE shows me, that the coral_usb.cfg cannot be imported. I searched through the old issues, but found only attempts for older ROS versions.

The community says it's more an bug than an error.

Screenshot from 2022-07-12 15-20-31

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.