flydra 0.7.3 camera synchronization fails
Starting main_brain.launch works, camnode runs and detects four cameras, but camera synchronization fails in the following way:
roscd ros_flydra; python scripts/simple-console.py --sync
sync cameras
Traceback (most recent call last):
File "scripts/simple-console.py", line 86, in <module>
sync_cameras()
File "scripts/simple-console.py", line 16, in sync_cameras
xx.call()
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 495, in call
service_uri = self._get_service_uri(request)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 463, in _get_service_uri
raise ServiceException("service [%s] unavailable"%self.resolved_name)
rospy.service.ServiceException: service [/flydra_mainbrain/do_synchronization] unavailable
Perhaps there is a problem with camnodes. Here is the output with some errors:
rosrun ros_flydra camnode
[INFO] [1518375869.911679]: ROS name: /flydra_camnode
[INFO] [1518375870.022264]: choosing camera guid: Allied Vision Technologies-02-2020A-06063 (cam_id: 0)
[INFO] [1518375870.022838]: choosing camera guid: Allied Vision Technologies-02-2020C-07055 (cam_id: 1)
[INFO] [1518375870.023050]: choosing camera guid: Allied Vision Technologies-02-2020C-07056 (cam_id: 2)
[INFO] [1518375870.023325]: choosing camera guid: Allied Vision Technologies-02-2020C-07058 (cam_id: 3)
[INFO] [1518375870.023523]: choosing camera guid: Prosilica-02-2020C-06767 (cam_id: 4)
[INFO] [1518375870.027254]: constructing camera guid: Prosilica-02-2020C-06767 (cam_id: 4 cam_no: 0)
(process:97692): Aravis-CRITICAL **: arv_dom_document_get_document_element: assertion 'ARV_IS_DOM_DOCUMENT (self)' failed
(process:97692): Aravis-CRITICAL **: arv_gc_register_description_node_check_schema_version: assertion 'ARV_IS_GC_REGISTER_DESCRIPTION_NODE (node)' failed
(process:97692): Aravis-CRITICAL **: arv_device_get_feature: assertion 'ARV_IS_GC (genicam)' failed
(process:97692): Aravis-CRITICAL **: arv_device_get_feature: assertion 'ARV_IS_GC (genicam)' failed
(process:97692): Aravis-CRITICAL **: arv_device_get_feature: assertion 'ARV_IS_GC (genicam)' failed
(process:97692): Aravis-CRITICAL **: arv_device_get_feature: assertion 'ARV_IS_GC (genicam)' failed
(process:97692): Aravis-CRITICAL **: arv_device_get_feature: assertion 'ARV_IS_GC (genicam)' failed
(process:97692): Aravis-CRITICAL **: arv_device_get_feature: assertion 'ARV_IS_GC (genicam)' failed
[INFO] [1518375872.446193]: Opened CamifaceCamera #4 mode 0='UNKNOWN'
[INFO] [1518375872.460933]: getting camera property from default shutter=9000
[INFO] [1518375872.468273]: getting camera property from default gain=300
[INFO] [1518375872.486903]: getting camera property from default trigger=None
[INFO] [1518375872.491933]: getting camera property from default trigger_mode=-1
[INFO] [1518375872.492673]: trigger name not set, falling back to trigger_mode
[INFO] [1518375872.516770]: constructing camera guid: Allied Vision Technologies-02-2020C-07058 (cam_id: 3 cam_no: 1)
[INFO] [1518375875.571244]: Opened CamifaceCamera #3 mode 0='640 x 480 DC1394_VIDEO_MODE_FORMAT7_0 MONO8'
[INFO] [1518375875.595781]: getting camera property from default shutter=9000
[INFO] [1518375875.619672]: getting camera property from default gain=300
[INFO] [1518375875.638780]: getting camera property from default trigger=None
[INFO] [1518375875.659219]: getting camera property from default trigger_mode=-1
[INFO] [1518375875.661205]: trigger name not set, falling back to trigger_mode
[INFO] [1518375875.684208]: constructing camera guid: Allied Vision Technologies-02-2020C-07056 (cam_id: 2 cam_no: 2)
[INFO] [1518375879.163512]: Opened CamifaceCamera #2 mode 0='640 x 480 DC1394_VIDEO_MODE_FORMAT7_0 MONO8'
[INFO] [1518375879.192383]: getting camera property from default shutter=9000
[INFO] [1518375879.230111]: getting camera property from default gain=300
[INFO] [1518375879.271572]: getting camera property from default trigger=None
[INFO] [1518375879.291285]: getting camera property from default trigger_mode=-1
[INFO] [1518375879.296558]: trigger name not set, falling back to trigger_mode
[INFO] [1518375879.342690]: constructing camera guid: Allied Vision Technologies-02-2020C-07055 (cam_id: 1 cam_no: 3)
[INFO] [1518375885.023521]: Opened CamifaceCamera #1 mode 0='640 x 480 DC1394_VIDEO_MODE_FORMAT7_0 MONO8'
[INFO] [1518375885.085966]: getting camera property from default shutter=9000
[INFO] [1518375885.140124]: getting camera property from default gain=300
[INFO] [1518375885.237208]: getting camera property from default trigger=None
[INFO] [1518375885.313077]: getting camera property from default trigger_mode=-1
[INFO] [1518375885.339916]: trigger name not set, falling back to trigger_mode
[INFO] [1518375885.411723]: constructing camera guid: Allied Vision Technologies-02-2020A-06063 (cam_id: 0 cam_no: 4)
[INFO] [1518375948.105343]: Opened CamifaceCamera #0 mode 0='640 x 480 DC1394_VIDEO_MODE_FORMAT7_0 MONO8'
[INFO] [1518375948.641749]: getting camera property from default shutter=9000
[INFO] [1518375948.749582]: getting camera property from default gain=300
[INFO] [1518375949.300464]: getting camera property from default trigger=None
[INFO] [1518375949.379790]: getting camera property from default trigger_mode=-1
[INFO] [1518375949.380430]: trigger name not set, falling back to trigger_mode
From your first message, it seems the script cannot connect to the ROS service. What is the output of rosservice list? I don't think the cut-and-paste from the camnodes is relevant to the problem, as the error message is service [/flydra_mainbrain/do_synchronization] unavailable
Thank you, here is the output of rosservice list:
/main_brain/get_loggers
/main_brain/set_logger_level
/rosout/get_loggers
/rosout/set_logger_level
OK, so it seems there are 2 issues: 1) the mainbrain is running at the name main_brain not flydra_mainbrain as expected by the script. 2) there is no do_synchronization available from it.
Let's solve them one at a time, so for the first one: how are you starting the main brain? If it is a launch file, please change name="main_brain" to `name="flydra_mainbrain" so it is something like this:
<node name="flydra_mainbrain" pkg="ros_flydra" type="main_brain"/>
Got it. I use the main_brain.launch file and I renamed the node to flydra_mainbrain.
I just tried running camera sync but do_synchronization is still not available.
The mainbrain app is either not available from the terminal where you are running the command or else it is failing to start correctly. What is the output in the terminal where you start the mainbrain?
Here is the output from the mainbrain launch terminal:
roslaunch ros_flydra main_brain.launch
... logging to /home/flightlab/.ros/log/0001d808-0f70-11e8-ba81-000c2967883e/roslaunch-ubuntu-25637.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://ubuntu:42645/
SUMMARY
========
PARAMETERS
* /flydra/main_brain: localhost
* /flydra_mainbrain/camera_calibration: /home/flightlab/r...
* /flydra_mainbrain/frames_per_second: 100.0
* /flydra_mainbrain/hypothesis_test_max_acceptable_error: 50.0
* /flydra_mainbrain/kalman_model: EKF mamarama, uni...
* /flydra_mainbrain/max_N_hypothesis_test: 3
* /flydra_mainbrain/max_reconstruction_latency_sec: 0.06
* /flydra_mainbrain/save_data_dir: ~/FLYDRA
* /rosdistro: kinetic
* /rosversion: 1.12.12
NODES
/
flydra_mainbrain (ros_flydra/main_brain)
auto-starting new master
process[master]: started with pid [25650]
ROS_MASTER_URI=http://localhost:11311
setting /run_id to 0001d808-0f70-11e8-ba81-000c2967883e
process[rosout-1]: started with pid [25664]
started core service [/rosout]
process[flydra_mainbrain-2]: started with pid [25667]
[WARN] [1518383437.977172]: deprecated 'server' argument given.
Does mainbrain appear to be running okay based on this output?