Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run demo #66

Open
a-ichikura opened this issue Aug 13, 2021 · 26 comments
Open

How to run demo #66

a-ichikura opened this issue Aug 13, 2021 · 26 comments
Labels
question Further information is requested

Comments

@a-ichikura
Copy link

a-ichikura commented Aug 13, 2021

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?

@knorth55
Copy link
Member

can you paste all the output of the error log when you run roslaunch coral_usb edgetpu_object_detector.launch INPUT_IMAGE:=/image_publisher/output?

@knorth55
Copy link
Member

knorth55 commented Aug 13, 2021

if you want to run insta360, you need insta360 panorama camera, but do you have it?
it is a fisheye 360 degree camera, which is quite special camera.
for your sample, you dont need to try it.

@a-ichikura
Copy link
Author

This is all message when I run the code.
RLException: [edgetpu_object_detector.launch] is neither a launch file in package [coral_usb] nor is [coral_usb] a launch file name The traceback for the exception was written to the log file

@knorth55
Copy link
Member

knorth55 commented Aug 13, 2021

it seems you didn't do source ~/coral_ws/devel/setup.bash.
source your workspace and try again.

and please copy and paset whole output lines. all. everything.
like this: https://github.com/knorth55/coral_usb_ros/issues/29#issuecomment-686969361

@knorth55
Copy link
Member

knorth55 commented Aug 13, 2021

can you try these codes one buy one carefully? and put all output?

roscore
source /opt/ros/melodic/setup.bash
rosrun usb_cam usb_cam_node
source ~/coral_ws/devel/setup.bash
roslaunch coral_usb edgetpu_object_detector.launch INPUT_IMAGE:=/usb_cam/image_raw
source /opt/ros/melodic/setup.bash
rosrun image_view image_view image:=/edgetpu_object_detector/output/image

@a-ichikura
Copy link
Author

a-ichikura commented Aug 13, 2021

leus@ubuntu:~/coral_ws/src/coral_usb_ros/scripts$ roslaunch coral_usb edgetpu_object_detector.launch INPUT_IMAGE:=/image_publisher/output
... logging to /home/leus/.ros/log/24476b72-fc2c-11eb-83fa-18cc1878776f/roslaunch-ubuntu-5635.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://192.168.10.106:39681/

SUMMARY
========

PARAMETERS
 * /edgetpu_object_detector/device_id: 0
 * /edgetpu_object_detector/image_transport: raw
 * /edgetpu_object_detector/label_file: /home/leus/coral_...
 * /edgetpu_object_detector/model_file: /home/leus/coral_...
 * /rosdistro: melodic
 * /rosversion: 1.14.10

NODES
  /
    edgetpu_object_detector (coral_usb/edgetpu_object_detector.py)

ROS_MASTER_URI=http://localhost:11311

process[edgetpu_object_detector-1]: started with pid [5650]
[INFO] [1628859599.086150]: Using transport raw
[WARN] [1628859604.095315]: [/edgetpu_object_detector] subscribes topics only with child subscribers. Set '~always_subscribe' as True to have it subscribe always.

@knorth55
Copy link
Member

with the output, it seems working correctly.
does your pc have camera?

@a-ichikura
Copy link
Author

yes, I have a camera.

@knorth55
Copy link
Member

so how does image_view look like?
does it shows image?

@knorth55
Copy link
Member

I update the readme.
you can check the output image with image_view .
https://github.com/knorth55/coral_usb_ros#run-image_view

@knorth55
Copy link
Member

how does GUI looks like?

@knorth55
Copy link
Member

can you also check the frequency of the output?

rostopic hz /edgetpu_object_detector/output/image

@a-ichikura
Copy link
Author

no window appears

@knorth55
Copy link
Member

thats wierd.
how about rosrun rqt_image_view rqt_image_view?

@a-ichikura
Copy link
Author

a-ichikura commented Aug 13, 2021

I checked the frequency

leus@ubuntu:~/coral_ws/src/coral_usb_ros/scripts$ rostopic hz /edgetpu_object/output/image
WARNING: topic [/edgetpu_object/output/image] does not appear to be published yet

@knorth55
Copy link
Member

can you paste the output of this command?

rosnode list
rostopic list
rosnode info /edgetpu_object_detector
rosnode ping /edgetpu_object_detector
rostopic info /edgetpu_object_detector/output/image
rostopic hz /edgetpu_object_detector/output/image

@knorth55
Copy link
Member

knorth55 commented Aug 13, 2021

I checked the frequency
leus@ubuntu:~/coral_ws/src/coral_usb_ros/scripts$ rostopic hz /edgetpu_object/output/image

also you are mistyping.

@a-ichikura
Copy link
Author

a-ichikura commented Aug 13, 2021

leus@ubuntu:~/coral_ws/src/coral_usb_ros/scripts$ rosnode list
/image_view
/rosout
/rqt_gui_cpp_node_6856
leus@ubuntu:~/coral_ws/src/coral_usb_ros/scripts$ rostopic list
/edgetpu_object_detector/output/image
/image_view/output
/image_view/parameter_descriptions
/image_view/parameter_updates
/rosout
/rosout_agg

@a-ichikura
Copy link
Author

a-ichikura commented Aug 13, 2021

leus@ubuntu:~/coral_ws/src/coral_usb_ros/scripts$ rosnode info /edgetpu_object_detector
Node [/edgetpu_object_detector]
Publications: None

Subscriptions: None

Services: None
leus@ubuntu:~/coral_ws/src/coral_usb_ros/scripts$ rosnode ping /edgetpu_object_detector
rosnode: node is [/edgetpu_object_detector]
cannot ping [/edgetpu_object_detector]: usource ~/coral_ws/devel/setup.bash
roslaunch coral_usb edgetpu_object_detector.launch INPUT_IMAGE:=/usb_cam/image_rawnknown node

@a-ichikura
Copy link
Author

a-ichikura commented Aug 13, 2021

leus@ubuntu:~/coral_ws/src/coral_usb_ros/scripts$ rostopic info /edgetpu_object_detector/output/image
Type: sensor_msgs/Image

Publishers: None

Subscribers: 
 * /image_view (http://192.168.10.106:38761/)
leus@ubuntu:~/coral_ws/src/coral_usb_ros/scripts$ rostopic hz /edgetpu_object_detector/output/image
subscribed to [/edgetpu_object_detector/output/image]
no new messages
no new messages
no new messages

@knorth55
Copy link
Member

leus@ubuntu:~/coral_ws/src/coral_usb_ros/scripts$ rosnode list
/image_view
/rosout
/rqt_gui_cpp_node_6856

are you keep running this launch?

source ~/coral_ws/devel/setup.bash
roslaunch coral_usb edgetpu_object_detector.launch INPUT_IMAGE:=/usb_cam/image_raw

@a-ichikura
Copy link
Author

a-ichikura commented Aug 13, 2021

sorry, I am running image_view. I relaunch.

leus@ubuntu:~/coral_ws/src/coral_usb_ros/scripts$ rostopic list
/edgetpu_object_detector/output/class
/edgetpu_object_detector/output/image
/edgetpu_object_detector/output/image/compressed
/edgetpu_object_detector/output/rects
/edgetpu_object_detector/parameter_descriptions
/edgetpu_object_detector/parameter_updates
/rosout
/rosout_agg
leus@ubuntu:~/coral_ws/src/coral_usb_ros/scripts$ rosnode ping /edgetpu_object_detector
rosnode: node is [/edgetpu_object_detector]
pinging /edgetpu_object_detector with a timeout of 3.0s
xmlrpc reply from http://192.168.10.106:36579/	time=0.826120ms
xmlrpc reply from http://192.168.10.106:36579/	time=2.608061ms
xmlrpc reply from http://192.168.10.106:36579/	time=2.347946ms

@knorth55
Copy link
Member

knorth55 commented Aug 13, 2021

please run these three commands in different terminals in parallel
https://github.com/knorth55/coral_usb_ros/issues/66#issuecomment-898442658

@a-ichikura
Copy link
Author

please run these three commands in different terminals in parallel
#66 (comment)

Succeeded.

@knorth55
Copy link
Member

Good!

@knorth55 knorth55 changed the title no jsk_perception file how to run demo Aug 13, 2021
@knorth55 knorth55 changed the title how to run demo Wow to run demo Aug 13, 2021
@knorth55 knorth55 changed the title Wow to run demo How to run demo Aug 13, 2021
@knorth55 knorth55 added the question Further information is requested label Aug 13, 2021
@knorth55
Copy link
Member

knorth55 commented Aug 13, 2021

if you want to try with another image topic (like robot image topic), you can do like this.

please start your robot first and...

source /opt/ros/melodic/setup.bash
# if you need to connect to robot, 
# rossetip
# rossetmaster <robot ip>
source ~/coral_ws/devel/setup.bash
roslaunch coral_usb edgetpu_object_detector.launch INPUT_IMAGE:=<robot image topic name>
source /opt/ros/melodic/setup.bash
# if you need to connect to robot, 
# rossetip
# rossetmaster <robot ip>
rosrun image_view image_view image:=/edgetpu_object_detector/output/image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants