braid-pylon run default-config.toml
INFO 2019-11-28T13:01:34Z: braid: braid 0.7.1+53ed801c6498ce14222a9b9aeb75bd117ffe5cd3 starting
INFO 2019-11-28T13:01:34Z: flydra2_mainbrain: saving to directory: /home/elhanan_la/Videos
INFO 2019-11-28T13:01:34Z: flydra2: using TrackingParams TrackingParams { motion_noise_scale: 0.1, initial_position_std_meters: 0.1, initial_vel_std_meters_per_sec: 1.0, ekf_observation_covariance_pixels: 1.0, accept_observation_min_likelihood: 0.00000001, max_position_std_meters: 0.01212, hypothesis_test_params: HypothesisTestParams { minimum_number_of_cameras: 2, hypothesis_test_max_acceptable_error: 5.0, minimum_pixel_abs_zscore: 0.0 } }
Depending on things, you may be able to login with this url: http://127.0.0.1:46081/
INFO 2019-11-28T13:01:34Z: strand_cam: camera module: async-pylon
INFO 2019-11-28T13:01:34Z: strand_cam: camera "Basler-23047980" detected
INFO 2019-11-28T13:01:34Z: strand_cam: camera "Basler-23088879" detected
INFO 2019-11-28T13:01:34Z: strand_cam: camera "Basler-23088882" detected
INFO 2019-11-28T13:01:35Z: strand_cam: got camera Basler-23088882No trigger device clock model.
No calibration.
0 cameras:Data hasn't fetched yet.
INFO 2019-11-28T12:56:43Z: flydra2_mainbrain: preparing to synchronize cameras
INFO 2019-11-28T12:56:43Z: flydra2_mainbrain: preparing for triggerbox to temporarily stop sending pulses
INFO 2019-11-28T12:56:43Z: flydra2_mainbrain: requesting triggerbox to stop sending pulses
INFO 2019-11-28T12:56:46Z: flydra2_mainbrain: requesting triggerbox to start sending pulses again--
You received this message because you are subscribed to the Google Groups "multi-camera software from the Straw Lab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to multicams+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/multicams/b394f60e-d4a8-4b2e-8462-8417ef5fdf4a%40googlegroups.com.
<default-config.toml>
trigger device clock model: ClockModel { gain: 0.01001801120582968, offset: 1575023222.675574, residuals: 0.0001030166406508215, n_measurements: 17 }
No calibration.
3 cameras:- Basler_23047980 Unsynchronized RecentStats { total_frames_collected: 0, frames_collected: 0, points_detected: 0 }
- Basler_23088879 Unsynchronized RecentStats { total_frames_collected: 0, frames_collected: 0, points_detected: 0 }
- Basler_23088882 Unsynchronized RecentStats { total_frames_collected: 0, frames_collected: 0, points_detected: 0 }
roslaunch freemovr_engine flycube_only_flydra.launch --screen
... logging to /home/elhanan_la/.ros/log/574cf49a-1292-11ea-8aca-4c52622fa18c/roslaunch-nfc3006-2195.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.
Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/__init__.py", line 306, in main
p.start()
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/parent.py", line 268, in start
self._start_infrastructure()
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/parent.py", line 217, in _start_infrastructure
self._load_config()
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/parent.py", line 132, in _load_config
roslaunch_strs=self.roslaunch_strs, verbose=self.verbose)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/config.py", line 451, in load_config_default
loader.load(f, config, verbose=verbose)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 749, in load
self._load_launch(launch, ros_config, is_core=core, filename=filename, argv=argv, verbose=verbose)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 721, in _load_launch
self._recurse_load(ros_config, launch.childNodes, self.root_context, None, is_core, verbose)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 685, in _recurse_load
val = self._include_tag(tag, context, ros_config, default_machine, is_core, verbose)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 95, in call
return f(*args, **kwds)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 589, in _include_tag
inc_filename = self.resolve_args(tag.attributes['file'].value, context)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 183, in resolve_args
return substitution_args.resolve_args(args, context=context.resolve_dict, resolve_anon=self.resolve_anon)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 370, in resolve_args
resolved = _resolve_args(resolved, context, resolve_anon, commands)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 383, in _resolve_args
resolved = commands[command](resolved, a, args, context)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 151, in _find
source_path_to_packages=source_path_to_packages)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 197, in _find_executable
full_path = _get_executable_path(rp.get_path(args[0]), path)
File "/usr/lib/python2.7/dist-packages/rospkg/rospack.py", line 203, in get_path
raise ResourceNotFound(name, ros_paths=self._ros_paths)
ResourceNotFound: freemovr_arena
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/home/elhanan_la/ros/freemovr-kinetic/src
ROS path [2]=/opt/ros/kinetic/share
To unsubscribe from this group and stop receiving emails from it, send an email to mult...@googlegroups.com.
On 29 Nov 2019, at 11:28 AM, Elhanan Ben Yishay <elha...@gmail.com> wrote:Hi Andrew - indeed, the wiring was incorrect - I forgot to connect the camera trigger to the GND. Now when running the same command I'm getting the Braid page up and running, and showing all the cameras:trigger device clock model: ClockModel { gain: 0.01001801120582968, offset: 1575023222.675574, residuals: 0.0001030166406508215, n_measurements: 17 }
No calibration.
3 cameras:
- Basler_23047980 Unsynchronized RecentStats { total_frames_collected: 0, frames_collected: 0, points_detected: 0 }
- Basler_23088879 Unsynchronized RecentStats { total_frames_collected: 0, frames_collected: 0, points_detected: 0 }
- Basler_23088882 Unsynchronized RecentStats { total_frames_collected: 0, frames_collected: 0, points_detected: 0 }
However, I still have a question regarding starting up the calibration acquisition - I am following the instructions here, after installing the make_freemovr_workspace.sh role.
I have also downloaded the example ROS configuration files, and placed them in the freemovr_engine folder. However, when trying to run the flycube_only_flydra.launch file I get this error:
Trigger device clock model: ClockModel { gain: 0.010020261484896764, offset: 1575279969.3357232, residuals: 0.0010873918043898811, n_measurements: 66 }No calibration.
3 cameras:- Basler_23047980 Unsynchronized RecentStats { total_frames_collected: 0, frames_collected: 0, points_detected: 0 }
- Basler_23088879 Unsynchronized RecentStats { total_frames_collected: 0, frames_collected: 0, points_detected: 0 }
- Basler_23088882 Unsynchronized RecentStats { total_frames_collected: 0, frames_collected: 0, points_detected: 0 }
INFO 2019-12-02T09:41:56Z: flydra1_triggerbox: connected to triggerbox firmware version 14
INFO 2019-12-02T09:41:56Z: flydra2_mainbrain::multicam_http_session_handler: opening session for cam Basler_23047980 to http://127.0.0.1:41903
INFO 2019-12-02T09:41:56Z: flydra2_mainbrain::multicam_http_session_handler: opening session for cam Basler_23088879 to http://127.0.0.1:40503
INFO 2019-12-02T09:41:56Z: flydra2_mainbrain::multicam_http_session_handler: opening session for cam Basler_23088882 to http://127.0.0.1:42895
INFO 2019-12-02T09:46:06Z: flydra2_mainbrain: preparing to synchronize cameras
INFO 2019-12-02T09:46:06Z: flydra2_mainbrain: preparing for triggerbox to temporarily stop sending pulses
INFO 2019-12-02T09:46:06Z: flydra2_mainbrain: requesting triggerbox to stop sending pulses
INFO 2019-12-02T09:46:09Z: flydra2_mainbrain: requesting triggerbox to start sending pulses again
INFO 2019-12-02T09:49:11Z: braid: braid 0.7.1+53ed801c6498ce14222a9b9aeb75bd117ffe5cd3 starting
INFO 2019-12-02T09:49:11Z: flydra2_mainbrain: saving to directory: /home/elhanan_la/Videos
INFO 2019-12-02T09:49:11Z: flydra2: using TrackingParams TrackingParams { motion_noise_scale: 0.1, initial_position_std_meters: 0.1, initial_vel_std_meters_per_sec: 1.0, ekf_observation_covariance_pixels: 1.0, accept_observation_min_likelihood: 0.00000001, max_position_std_meters: 0.01212, hypothesis_test_params: HypothesisTestParams { minimum_number_of_cameras: 2, hypothesis_test_max_acceptable_error: 5.0, minimum_pixel_abs_zscore: 0.0 } }
Depending on things, you may be able to login with this url: http://127.0.0.1:37133/
INFO 2019-12-02T09:49:11Z: strand_cam: camera module: async-pylon
INFO 2019-12-02T09:49:11Z: strand_cam: camera "Basler-23047980" detected
INFO 2019-12-02T09:49:11Z: strand_cam: camera "Basler-23088879" detected
INFO 2019-12-02T09:49:11Z: strand_cam: camera "Basler-23088882" detected
INFO 2019-12-02T09:49:11Z: strand_cam: got camera Basler-23088882
Hi Andrew,from testing the triggerbox with an oscilloscope it seems I'm getting a nice square-wave at 50Hz (which is weird since I set the frame rate to 100). Is it possible that Braid sets the wrong input line on the Basler cameras themselves? or is there any way to configure which trigger input line to use?BestElhanan
--
You received this message because you are subscribed to the Google Groups "multi-camera software from the Straw Lab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to multicams+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/multicams/955d150e-2c7d-49bb-a9c9-b38716904b5f%40googlegroups.com.
trigger device clock model: ClockModel { gain: 0.005004672333598137, offset: 1576487365.0227346, residuals: 0.0007103912438992666, n_measurements: 27 }
No calibration.
3 cameras:- Basler_23047980 Synchronized(7721) RecentStats { total_frames_collected: 8008, frames_collected: 200, points_detected: 0 }
- Basler_23088879 Synchronized(3799) RecentStats { total_frames_collected: 4001, frames_collected: 101, points_detected: 0 }
- Basler_23088882 Synchronized(3938) RecentStats { total_frames_collected: 4005, frames_collected: 100, points_detected: 0 }
This got off-thread, but I'm putting it back here.
---------- Forwarded message ---------
From: Andrew Straw <dr.and...@gmail.com>
Date: Wed, Dec 4, 2019 at 9:51 PM
Subject: Re: Questions regarding Braid setup
To: Elhanan Ben Yishay <elha...@gmail.com>Braid uses the default trigger input, which I think is Line 1 on the Basler cameras. (To enable external triggering, Braid sets TriggerMode to On and TriggerSelector to FrameStart.) You should be able to open your camera in the Pylon Viewer App after braid to check its settings. Conversely, you should be able to set its settings and then re-open it in Braid. Apart from a few that get reset explicitly by Braid (such as TriggerMode), Braid will not touch the other settings.
On Wed, Dec 4, 2019 at 1:50 PM Elhanan Ben Yishay <elha...@gmail.com> wrote:
Hi Andrew,from testing the triggerbox with an oscilloscope it seems I'm getting a nice square-wave at 50Hz (which is weird since I set the frame rate to 100). Is it possible that Braid sets the wrong input line on the Basler cameras themselves? or is there any way to configure which trigger input line to use?BestElhanan
On Tue, Dec 3, 2019 at 1:47 PM Andrew Straw <dr.and...@gmail.com> wrote:
--Dear Elhanen,To the best of my knowledge, the schematic in the PDF is correct. You can validate the triggerbox by attaching an oscilloscope and checking that you do indeed get trigger pulses. Still, the PDF schematic of the triggerbox does not specify which pin on your camera is used as the external trigger.Since it seems that the frame count is not increasing when the camera is set to external trigger mode, I think your cameras are not being triggered.Best,Andrew
You received this message because you are subscribed to the Google Groups "multi-camera software from the Straw Lab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mult...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/multicams/955d150e-2c7d-49bb-a9c9-b38716904b5f%40googlegroups.com.
This got off-thread, but I'm putting it back here.
---------- Forwarded message ---------
From: Andrew Straw <dr.and...@gmail.com>
Date: Wed, Dec 4, 2019 at 9:51 PM
Subject: Re: Questions regarding Braid setup
To: Elhanan Ben Yishay <elha...@gmail.com>Braid uses the default trigger input, which I think is Line 1 on the Basler cameras. (To enable external triggering, Braid sets TriggerMode to On and TriggerSelector to FrameStart.) You should be able to open your camera in the Pylon Viewer App after braid to check its settings. Conversely, you should be able to set its settings and then re-open it in Braid. Apart from a few that get reset explicitly by Braid (such as TriggerMode), Braid will not touch the other settings.
On Wed, Dec 4, 2019 at 1:50 PM Elhanan Ben Yishay <elha...@gmail.com> wrote:
Hi Andrew,from testing the triggerbox with an oscilloscope it seems I'm getting a nice square-wave at 50Hz (which is weird since I set the frame rate to 100). Is it possible that Braid sets the wrong input line on the Basler cameras themselves? or is there any way to configure which trigger input line to use?BestElhanan
On Tue, Dec 3, 2019 at 1:47 PM Andrew Straw <dr.and...@gmail.com> wrote:
--Dear Elhanen,To the best of my knowledge, the schematic in the PDF is correct. You can validate the triggerbox by attaching an oscilloscope and checking that you do indeed get trigger pulses. Still, the PDF schematic of the triggerbox does not specify which pin on your camera is used as the external trigger.Since it seems that the frame count is not increasing when the camera is set to external trigger mode, I think your cameras are not being triggered.Best,Andrew
You received this message because you are subscribed to the Google Groups "multi-camera software from the Straw Lab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mult...@googlegroups.com.
Hi Andrew,So I figured what was the issue with the triggering - I was using the GP-I/O cables, which don't have a Line1 configured; when switching to the Opto-I/O cables the cameras trigger properly.
Also, it is not possible to open Pylon after starting Braid - you get a 'Device is exclusively opened by another client.' error.
Finally, I just updated to the new Braid release this morning, and I have an issue where one of the cameras trigger twice as much as the others:trigger device clock model: ClockModel { gain: 0.005004672333598137, offset: 1576487365.0227346, residuals: 0.0007103912438992666, n_measurements: 27 }
No calibration.
3 cameras:
- Basler_23047980 Synchronized(7721) RecentStats { total_frames_collected: 8008, frames_collected: 200, points_detected: 0 }
- Basler_23088879 Synchronized(3799) RecentStats { total_frames_collected: 4001, frames_collected: 101, points_detected: 0 }
- Basler_23088882 Synchronized(3938) RecentStats { total_frames_collected: 4005, frames_collected: 100, points_detected: 0 }
Hi Andrew, sorry for the double response - I forgot to ask regarding the calibration.I've already done the internal checkerboard calibration for each camera separately; for the mutli-camera calibration, I assume i need to use braid-pylon to track the LED pointer, convert it to hdf5, and then pass it through flydra_analysis_generate_recalibration?
INFO 2019-12-19T13:11:25Z: strand_cam: camera module: async-pylon
INFO 2019-12-19T13:11:25Z: strand_cam: camera "Basler-23047980" detected
INFO 2019-12-19T13:11:25Z: strand_cam: camera "Basler-23088879" detected
INFO 2019-12-19T13:11:25Z: strand_cam: camera "Basler-23088882" detected
INFO 2019-12-19T13:11:26Z: strand_cam: got camera Basler-23088882
^C INFO 2019-12-19T13:13:26Z: flydra2_mainbrain: got Ctrl-C, shutting down
^C INFO 2019-12-19T13:13:38Z: flydra2_mainbrain: got Ctrl-C, shutting down
ERROR 2019-12-19T13:13:38Z: flydra2_mainbrain: failed sending quit command: channel closed
Next, using this new calibration, collect a dataset which outlines the geometry of your arena [...] Easist is to acquire this dataset directly by running Braid with the new calibration.
Hi Andrew, thank you very much for all the help.1. Regarding the camera shut-down - after closing Braid with Ctrl-C I am able to open Pylon and change the settings (for example the trigger line); however once i try to restart Braid it gets stuck relatively early on:INFO 2019-12-19T13:11:25Z: strand_cam: camera module: async-pylon
INFO 2019-12-19T13:11:25Z: strand_cam: camera "Basler-23047980" detected
INFO 2019-12-19T13:11:25Z: strand_cam: camera "Basler-23088879" detected
INFO 2019-12-19T13:11:25Z: strand_cam: camera "Basler-23088882" detected
INFO 2019-12-19T13:11:26Z: strand_cam: got camera Basler-23088882And if I try to Ctrl-C:^C INFO 2019-12-19T13:13:26Z: flydra2_mainbrain: got Ctrl-C, shutting down
^C INFO 2019-12-19T13:13:38Z: flydra2_mainbrain: got Ctrl-C, shutting down
ERROR 2019-12-19T13:13:38Z: flydra2_mainbrain: failed sending quit command: channel closed
2. Regarding the calibration: I am able to get low mean reprojection errors, but I have a question regarding the next step:Next, using this new calibration, collect a dataset which outlines the geometry of your arena [...] Easist is to acquire this dataset directly by running Braid with the new calibration.How can I run Braid with the new calibration? From the config file, is see it requires an .xml file (cal_fname = "/path/to/cal.xml"), but none is generated during the calibraiton process.
Dear Elhanen,
These should behave identically to the parameters in https://github.com/motmot/realtime_image_analysis . Here is a brief description for each:
polarity: ContrastPolarity
alpha: f32How much to weight the update of the background model. Valid range is 0.0 - 1.0. 0.0 means never update, 1.0 means complete replacement on every update.
n_sigma: f32Number of standard deviations a pixel must differ by to be detected.
Used when use_cmp is true. No effect when use_cmp is false. Valid
range is 0.0 - infinity. 0.0 means any difference is detected, large
value means only large deviations from mean are detected.
bright_non_gaussian_cutoff: u8(used when use_cmp is true)
bg_update_interval: u32Valid range is 0-4294967295.
diff_threshold: u8use_cmp is true, this is the absolute difference required to detect
a point.
use_cmp: booluse_cmp is true, use n_sigma based difference.
max_num_points: u16
feature_window_size: u16
clear_fraction: f32The result of this computation or despecked_threshold is used,
whichever is larger. Fraction of the maximum difference value in pixel
intensity. Valid range is 0.0 - 1.0. 0.0 means the value is 0, 1.0 means
the value used is the maximum difference in pixel intensity between the
current image and the mean of the background model.
despeckle_threshold: u8This value or the result of the clear_fraction computation is used,
whichever is larger. Intensity difference value. Value range is 0-255.
valid_region: Shape[2020-03-09T13:09:51Z INFO flydra2_mainbrain] preparing to synchronize cameras
[2020-03-09T13:09:51Z INFO flydra2_mainbrain] preparing for triggerbox to temporarily stop sending pulses
[2020-03-09T13:09:51Z INFO flydra2_mainbrain] requesting triggerbox to stop sending pulses
[2020-03-09T13:09:54Z INFO flydra2_mainbrain] requesting triggerbox to start sending pulses again
[2020-03-09T13:09:54Z INFO flydra2::connected_camera_manager] cam Basler_23047980 synchronized. frame_offset: 361214
[2020-03-09T13:09:54Z INFO flydra2_mainbrain::multicam_http_session_handler] for cam Basler_23047980, sending frame offset 361214
[2020-03-09T13:09:54Z INFO flydra2::connected_camera_manager] cam Basler_23088879 synchronized. frame_offset: 361196
[2020-03-09T13:09:54Z INFO flydra2_mainbrain::multicam_http_session_handler] for cam Basler_23088879, sending frame offset 361196
[2020-03-09T13:09:54Z INFO flydra2::connected_camera_manager] cam Basler_23096298 synchronized. frame_offset: 361178
[2020-03-09T13:09:54Z INFO flydra2_mainbrain::multicam_http_session_handler] for cam Basler_23096298, sending frame offset 361178
[2020-03-09T13:09:54Z INFO flydra2::connected_camera_manager] cam Basler_23088882 synchronized. frame_offset: 361231
[2020-03-09T13:09:54Z INFO flydra2_mainbrain::multicam_http_session_handler] for cam Basler_23088882, sending frame offset 361231
thread 'triggerbox_comms' panicked at 'cannot access stderr during shutdown', src/libcore/option.rs:1188:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
[2020-03-09T13:09:54Z ERROR flydra2_mainbrain] done listening for trigger clock data: sender hung up.
Segmentation fault (core dumped)
[2020-03-09T13:24:26Z WARN image_tracker] Basler_23088879 acquisition duration statistics: mode: 99 msec, max: 99+ msec (longest: 2588)
[2020-03-09T13:24:26Z WARN image_tracker] Basler_23047980 acquisition duration statistics: mode: 99 msec, max: 99+ msec (longest: 2668)
[2020-03-09T13:24:26Z WARN image_tracker] Basler_23096298 acquisition duration statistics: mode: 99 msec, max: 99+ msec (longest: 2503)
[2020-03-09T13:24:26Z WARN image_tracker] Basler_23088882 acquisition duration statistics: mode: 99 msec, max: 99+ msec (longest: 2745)
valid_region:
Circle:
center_x: 410
center_y: 570
radius: 600valid_region = "Circle"
center_x = 410
center_y = 570
radius = 600Error: Error { inner: ErrorInner { kind: Custom, line: None, col: 0, message: "invalid type: unit variant, expected newtype variant", key: ["cameras", "point_detection_config", "valid_region"] } }