[BUG] OAK-D-LITE stereo_inertial_node.launch.py lists topics but not display color, depth nor points images

Describe the bug
OAK-D-LITE plugged into Raspberry Pi4/4G Ubuntu 22.04.1/ROS2 Humble deptha-ros ver 2.9.0
Running ros2 launch depthai_examples stereo_inertial_node.launch.py camera_model:=OAK-D-LITE.
ros topic lists /color/image and /stereo/points/ , /stereo depth
No color image displayed on rqt , rqt_image_view , rviz2 using stereoInertialDepthAlignROS2.rviz no PointCloud2 nor Camera image. Only urdf RobotModel of the camera
Expected behavior
ros2 launch mobilenet publisher.launc.py and ros2 launch rgb_stero_node.launch.py displays;ay /color/image and /color/vieo/image & /stereo/depth on rqt_image_view
** Terminal Capture**
ubuntutbc@macvm-ub22h-bv:~$ ros2 launch depthai_examples stereo_inertial_node.launch.py camera_model:=OAK-D-LITE
[INFO] [launch]: All log files can be found below /home/ubuntutbc/.ros/log/2024-02-08-21-08-05-202023-macvm-ub22h-bv-11478
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [robot_state_publisher-1]: process started with pid [11491]
[INFO] [stereo_inertial_node-2]: process started with pid [11493]
[INFO] [component_container-3]: process started with pid [11495]
[INFO] [rviz2-4]: process started with pid [11497]
[rviz2-4] qt.qpa.xcb: could not connect to display
[rviz2-4] qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
[rviz2-4] This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
[rviz2-4]
[rviz2-4] Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
[rviz2-4]
[robot_state_publisher-1] [INFO] [1707444485.448931238] [oak_state_publisher]: got segment oak-d-base-frame
[robot_state_publisher-1] [INFO] [1707444485.449689613] [oak_state_publisher]: got segment oak-d_frame
[robot_state_publisher-1] [INFO] [1707444485.450202947] [oak_state_publisher]: got segment oak_left_camera_frame
[robot_state_publisher-1] [INFO] [1707444485.450568823] [oak_state_publisher]: got segment oak_left_camera_optical_frame
[robot_state_publisher-1] [INFO] [1707444485.450766573] [oak_state_publisher]: got segment oak_model_origin
[robot_state_publisher-1] [INFO] [1707444485.450993865] [oak_state_publisher]: got segment oak_rgb_camera_frame
[robot_state_publisher-1] [INFO] [1707444485.451252323] [oak_state_publisher]: got segment oak_rgb_camera_optical_frame
[robot_state_publisher-1] [INFO] [1707444485.451428948] [oak_state_publisher]: got segment oak_right_camera_frame
[robot_state_publisher-1] [INFO] [1707444485.451717449] [oak_state_publisher]: got segment oak_right_camera_optical_frame
[stereo_inertial_node-2] 1280 720 1280 720
[component_container-3] [INFO] [1707444485.648892763] [container]: Load Library: /opt/ros/humble/lib/libdepth_image_proc.so
[component_container-3] [INFO] [1707444485.716545037] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::ConvertMetricNode>
[component_container-3] [INFO] [1707444485.716619037] [container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::ConvertMetricNode>
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/convert_metric_node' in container '/container'
[component_container-3] [INFO] [1707444485.736169472] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::ConvertMetricNode>
[component_container-3] [INFO] [1707444485.736196556] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::CropForemostNode>
[component_container-3] [INFO] [1707444485.736199722] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::DisparityNode>
[component_container-3] [INFO] [1707444485.736202431] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyzNode>
[component_container-3] [INFO] [1707444485.736205056] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyzRadialNode>
[component_container-3] [INFO] [1707444485.736207722] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyziNode>
[component_container-3] [INFO] [1707444485.736210181] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyziRadialNode>
[component_container-3] [INFO] [1707444485.736212681] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyzrgbNode>
[component_container-3] [INFO] [1707444485.736215264] [container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyzrgbNode>
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/point_cloud_xyzrgb_node' in container '/container'
[stereo_inertial_node-2] Listing available devices...
[stereo_inertial_node-2] terminate called after throwing an instance of 'std::runtime_error'
[stereo_inertial_node-2]   what():  " DepthAI Device with MxId  "x" not found.  "
[ERROR] [rviz2-4]: process has died [pid 11497, exit code -6, cmd '/opt/ros/humble/lib/rviz2/rviz2 --display-config /opt/ros/humble/share/depthai_examples/rviz/stereoInertialDepthAlignROS2.rviz --ros-args'].
[ERROR] [stereo_inertial_node-2]: process has died [pid 11493, exit code -6, cmd '/opt/ros/humble/lib/depthai_examples/stereo_inertial_node --ros-args --params-file /tmp/launch_params_sjdz0415 --params-file /tmp/launch_params_c17wlj3f --params-file /tmp/launch_params_2scf_5uj --params-file /tmp/launch_params_f5h8hxfh --params-file /tmp/launch_params_5mq7bc5o --params-file /tmp/launch_params_oaa3ildz --params-file /tmp/launch_params_6ioofrt5 --params-file /tmp/launch_params_1swfl_j7 --params-file /tmp/launch_params_pgz77mdq --params-file /tmp/launch_params_xi4a5e6e --params-file /tmp/launch_params_p7g1pvlx --params-file /tmp/launch_params_1agm52r5 --params-file /tmp/launch_params_lb1ihwrn --params-file /tmp/launch_params_slwyzvhp --params-file /tmp/launch_params_zabd8pj3 --params-file /tmp/launch_params_ftp4p43z --params-file /tmp/launch_params_pg0h8_9j --params-file /tmp/launch_params_oakaqo4k --params-file /tmp/launch_params_v9hda9gt --params-file /tmp/launch_params_mbrdtvk2 --params-file /tmp/launch_params_e0jk3tkm --params-file /tmp/launch_params_vaeo2q7e --params-file /tmp/launch_params_0rl564io --params-file /tmp/launch_params_odiiw84y --params-file /tmp/launch_params_dqqdiylp --params-file /tmp/launch_params_uv6zuxhp --params-file /tmp/launch_params_mtdcz9e8 --params-file /tmp/launch_params_cv_puy13 --params-file /tmp/launch_params_ps2tfc5j --params-file /tmp/launch_params_02vae12p --params-file /tmp/launch_params_7qfm587v --params-file /tmp/launch_params_1q246hqn --params-file /tmp/launch_params_isdbanj8 --params-file /tmp/launch_params_saojzklh --params-file /tmp/launch_params_e9bziyi3'].
[component_container-3] [WARN] [1707444900.277069490] [point_cloud_xyzrgb_node]: New subscription discovered on topic '/stereo/points', requesting incompatible QoS. No messages will be sent to it. Last incompatible policy: RELIABILITY_QOS_POLICY
[component_container-3] [WARN] [1707444900.278032619] [point_cloud_xyzrgb_node]: New subscription discovered on topic '/stereo/points', requesting incompatible QoS. No messages will be sent to it. Last incompatible policy: RELIABILITY_QOS_POLICY
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)
[component_container-3] [INFO] [1707444965.237420323] [rclcpp]: signal_handler(signum=2)
[INFO] [robot_state_publisher-1]: process has finished cleanly [pid 11491]
[INFO] [component_container-3]: process has finished cleanly [pid 11495]
[robot_state_publisher-1] [INFO] [1707444965.237409157] [rclcpp]: signal_handler(signum=2)
ubuntutbc@macvm-ub22h-bv:~$
Attach system log

Provide output of log_system_information.py

Which OS/OS version are you using? Ubuntu 22.04.1

Which ROS version are you using? ROS 2 Humble

Which ROS distribution are you using ?

Is depthai-ros built from source or installed from apt? Installed from Binary (sudo apt install ros-humble-depthai-ros)

Please include versions of following packages - `

apt show ros-$ROS_DISTRO-depthai Version: 2.23.0-1jammy.20240125.203547

ros-$ROS_DISTRO-depthai-ros Version: 2.8.2-1jammy.20240126.132629

ros-$ROS_DISTRO-depthai-bridge Version: 2.8.2-1jammy.20240126.112720

ros-$ROS_DISTRO-depthai-ros-msgs Version: 2.8.2-1jammy.20240126.093736

ros-$ROS_DISTRO-depthai-ros-driver`Version: 2.8.2-1jammy.20240126.130347

To get additional logs, set DEPTHAI_DEBUG=1 and paste the logs, either from command line or from latest log in ~/.ros/log

Additional context
ros2 launch depthai_examples stereo.launch.py doesn't display /color/image either

Hi, sorry for the delay and thanks for the report. It seems that there has been a small change in firmware side regarding IMU detection. While stereo_inertial_node and other nodes in depthai_examples serve only as showcases how to write custom nodes, depthai_ros_driver has been updated, for now the fix is available on this branch, and will be merged to the upstream soon.

Thank you for the response. A ros2 build for source question: To continue using the depthai-ros examples in my experimenting until the upstream binary install is released , can I configure a workspace with the src depthai-ros and designate only the depthai-ros-drivers for a build compile as an overlay. Or is it necessary to build the entire depthai-ros repository package as an overlay?

On Raspberry Pi 4/4G /Ubuntu 22.04.3 ROS 2 Humble, After clone & rosdep-All required rosdeps installed successfully: Error message on build the new branch https://github.com/luxonis/depthai-ros/tree/no_imu_fix , rosdepthai_ros_driver package.
ubuntu@rp4-ub22h-mt:~/depthai-ros_ws$ colcon build --symlink-install --packages-select depthai_ros_driver --executor sequential --parallel-workers 1
[5.704s] WARNING:colcon.colcon_core.package_selection:Some selected packages are already built in one or more underlay workspaces:
'depthai_ros_driver' is in: /opt/ros/humble
If a package in a merged underlay workspace is overridden and it installs headers, then all packages in the overlay must sort their include directories by workspace order. Failure to do so may result in build failures or undefined behavior at run time.
If the overridden package is used by another package in any underlay, then the overriding package in the overlay must be API and ABI compatible or undefined behavior at run time may occur.
If you understand the risks and want to override a package anyways, add the following to the command line:
--allow-overriding depthai_ros_driver
This may be promoted to an error in a future release of colcon-override-check.
Starting >>> depthai_ros_driver
[6.151s] WARNING:colcon.colcon_core.shell:The following packages are in the workspace but haven't been built:

depthai_descriptions
depthai_ros_msgs
depthai_bridge
depthai_examples
They are being used from the following locations instead:
/opt/ros/humble
/opt/ros/humble
/opt/ros/humble
/opt/ros/humble
To suppress this warning ignore these packages in the workspace:
--packages-ignore depthai_descriptions depthai_ros_msgs depthai_bridge depthai_examples
--- stderr: depthai_ros_driver
In file included from /usr/include/c++/11/memory:76,
from /home/ubuntu/depthai-ros_ws/src/depthai-ros/depthai_ros_driver/include/depthai_ros_driver/dai_nodes/base_node.hpp:3,
from /home/ubuntu/depthai-ros_ws/src/depthai-ros/depthai_ros_driver/include/depthai_ros_driver/dai_nodes/sensors/imu.hpp:3,
from /home/ubuntu/depthai-ros_ws/src/depthai-ros/depthai_ros_driver/src/dai_nodes/sensors/imu.cpp:1:
/usr/include/c++/11/bits/unique_ptr.h: In instantiation of ‘typename std::_MakeUniq<_Tp>::__single_object std::make_unique(_Args&& ...) [with _Tp = dai::ros::ImuConverter; _Args = {std::__cxx11::basic_string<char, std::char_traits, std::allocator >, dai::ros::ImuSyncMethod&, float, float, float, float, bool, bool&, bool}; typename std::_MakeUniq<_Tp>::__single_object = std::unique_ptrdai::ros::ImuConverter]’:
/home/ubuntu/depthai-ros_ws/src/depthai-ros/depthai_ros_driver/src/dai_nodes/sensors/imu.cpp:45:60:   required from here
/usr/include/c++/11/bits/unique_ptr.h:962:30: error: no matching function for call to ‘dai::ros::ImuConverter::ImuConverter(std::__cxx11::basic_string, dai::ros::ImuSyncMethod&, float, float, float, float, bool, bool&, bool)’
962 |     { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...); }
|                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/ubuntu/depthai-ros_ws/src/depthai-ros/depthai_ros_driver/src/dai_nodes/sensors/imu.cpp:8:
/opt/ros/humble/include/depthai_bridge/ImuConverter.hpp:29:5: note: candidate: ‘dai::ros::ImuConverter::ImuConverter(const string&, dai::ros::ImuSyncMethod, double, double, double, double, bool, bool)’
29 |     ImuConverter(const std::string& frameName,
|     ^~~~~~~~~~~~
/opt/ros/humble/include/depthai_bridge/ImuConverter.hpp:29:5: note:   candidate expects 8 arguments, 9 provided
/opt/ros/humble/include/depthai_bridge/ImuConverter.hpp:27:7: note: candidate: ‘dai::ros::ImuConverter::ImuConverter(const dai::ros::ImuConverter&)’
27 | class ImuConverter {
|       ^~~~~~~~~~~~
/opt/ros/humble/include/depthai_bridge/ImuConverter.hpp:27:7: note:   candidate expects 1 argument, 9 provided
gmake[2]: *** [CMakeFiles/depthai_ros_driver_sensor_nodes.dir/build.make:76: CMakeFiles/depthai_ros_driver_sensor_nodes.dir/src/dai_nodes/sensors/imu.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:172: CMakeFiles/depthai_ros_driver_sensor_nodes.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2

Failed   <<< depthai_ros_driver [35.6s, exited with code 2]
Summary: 0 packages finished [39.6s]
1 package failed: depthai_ros_driver
1 package had stderr output: depthai_ros_driver
ubuntu@rp4-ub22h-mt:~/depthai-ros_ws$ cd src

Hi, this error message indicates that you should build depthai_bridge package as well since it also had a small modification in the latest release and depthai_ros_driver depends on it. Depending on changes between different releases some additional packages require to be also built. With each release we also provide Docker containers with pre-built workspace that can be used for testing/development purposes, more information here

Thanks for the response, which enabled a successful colcon build, and I now have your revised packages installed. Unfortunately the results are the same with no image or rviz pointcloud displays on several launch scripts even though the image , depth and points topics are published.So I prefer to wait until your upstream Binary install packages are available. Though If I get the opportunity, I may try the Docker ( which I am a new, inexperienced user.) as a learning experience,

I note Issue #500 and no_imu_fix branch is removed, which I assume fixes this issue #485  in depthai_ros_drivers? To try this I need to update this packge with a build? Should I build any others as well?

Ok, so I performed the 2.9.0-1 update of the this new Feb 23/24 binary install. All 4 launch files run. mobile_publisher.launch.py continues to work displaying color image on rqt_image_view.  rgb_stereo_node.launch.py displays RGB and Depth on rqt_image_view. stereo.launch.py enables the display of the BW mono and color images on rqt_image_view and BW image & pointcloud2 on rviz2. One small error for the Pointcloud2 Channel Name = Intensity for display a colored points. stereo.launch.py opens rviz displays BW image_rect and pointcloud2 and BW image_rect & depth in rqt_image_view. All good.                                                                               The problem: rgb_stereo_inertial_node.launch_ where rviz2 launches, and topics listed /color/image, /stereo/depth, /stereo/points  but no rgb, depth images show in rqt_image_view, rqt &  no color, depth nor points display in rviz2. I tried all 3 rviz files with no different results. Here is the last parts of the launch log that states there is no messages sent to /stereo/points;
[component_container-3] [WARN] [1708727943.675178994] [point_cloud_xyzrgb_node]: New subscription discovered on topic '/stereo/points', requesting incompatible QoS. No messages will be sent to it. Last incompatible policy: RELIABILITY_QOS_POLICY
[component_container-3] [WARN] [1708727943.680064118] [point_cloud_xyzrgb_node]: New subscription discovered on topic '/stereo/points', requesting incompatible QoS. No messages will be sent to it. Last incompatible policy: RELIABILITY_QOS_POLICY

Hi, could you check if there is data published on those topics via ros2 topic hz/echo topic_name?

Using Synaptic confirmed installed depthai-ros version is 2.9.0-1 jammy.2024

mobile_publisher.launch.py Shows image

stereo_inertail_nodelaunch.pt shows IMU error and no image or echo topic

ros2 launch depthai_examples mobile_publisher.launch.py camera_model:=OAK-D-LITE
rqt_image_view shows Color Image ---Good!
ubuntu@rp4-ub22h-r2:~$ ros2 topic list|grep color
/color/camera_info
/color/image
/color/image/compressed
/color/image/compressedDepth
/color/image/theora
/color/mobilenet_detections
ubuntu@rp4-ub22h-r2:~$ ros2 topic echo /color/image
header:
stamp:
sec:<PHONE_NUMBER>
nanosec: 844661940
frame_id: oak_rgb_camera_optical_frame
height: 300
width: 300
encoding: bgr8
is_bigendian: 0
step: 900
data:

69
ubuntu@rp4-ub22h-r2:~$ ros2 topic hz /color/image
average rate: 35.055
min: 0.025s max: 0.034s std dev: 0.00204s window: 37
average rate: 34.993
min: 0.025s max: 0.034s std dev: 0.00182s window: 73

Running stereo_inertial_node launch throws a "IMU not detected" error
ubuntu@rp4-ub22h-r2:~$ ros2 launch depthai_examples stereo_inertial_node.launch.py camera_model:=OAK-D-LITE enableRviz:=False
[INFO] [launch]: All log files can be found below /home/ubuntu/.ros/log/2024-02-28-15-27-37-378150-rp4-ub22h-r2-6872
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [robot_state_publisher-1]: process started with pid [6885]
[INFO] [stereo_inertial_node-2]: process started with pid [6887]
[INFO] [component_container-3]: process started with pid [6889]
[robot_state_publisher-1] [INFO] [1709152058.685191088] [oak_state_publisher]: got segment oak-d-base-frame
[robot_state_publisher-1] [INFO] [1709152058.685571216] [oak_state_publisher]: got segment oak-d_frame
[robot_state_publisher-1] [INFO] [1709152058.685659568] [oak_state_publisher]: got segment oak_left_camera_frame
[robot_state_publisher-1] [INFO] [1709152058.685703530] [oak_state_publisher]: got segment oak_left_camera_optical_frame
[robot_state_publisher-1] [INFO] [1709152058.685738326] [oak_state_publisher]: got segment oak_model_origin
[robot_state_publisher-1] [INFO] [1709152058.685767974] [oak_state_publisher]: got segment oak_rgb_camera_frame
[robot_state_publisher-1] [INFO] [1709152058.685798511] [oak_state_publisher]: got segment oak_rgb_camera_optical_frame
[robot_state_publisher-1] [INFO] [1709152058.685828271] [oak_state_publisher]: got segment oak_right_camera_frame
[robot_state_publisher-1] [INFO] [1709152058.685857696] [oak_state_publisher]: got segment oak_right_camera_optical_frame
[component_container-3] [INFO] [1709152058.800815871] [container]: Load Library: /opt/ros/humble/lib/libdepth_image_proc.so
[component_container-3] [INFO] [1709152059.181596248] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::ConvertMetricNode>
[component_container-3] [INFO] [1709152059.183331333] [container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::ConvertMetricNode>
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/convert_metric_node' in container '/container'
[component_container-3] [INFO] [1709152059.282435173] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::ConvertMetricNode>
[component_container-3] [INFO] [1709152059.282572524] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::CropForemostNode>
[component_container-3] [INFO] [1709152059.282607506] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::DisparityNode>
[component_container-3] [INFO] [1709152059.282635191] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyzNode>
[component_container-3] [INFO] [1709152059.282661320] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyzRadialNode>
[component_container-3] [INFO] [1709152059.282686820] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyziNode>
[component_container-3] [INFO] [1709152059.282712783] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyziRadialNode>
[component_container-3] [INFO] [1709152059.282737579] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyzrgbNode>
[component_container-3] [INFO] [1709152059.282762746] [container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyzrgbNode>
[stereo_inertial_node-2] 1280 720 1280 720
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/point_cloud_xyzrgb_node' in container '/container'
[stereo_inertial_node-2] Listing available devices...
[stereo_inertial_node-2] Device Mx ID:<PHONE_NUMBER>369F1200
[stereo_inertial_node-2] [1844301061369F1200] [1.1.2] [1.062] [MonoCamera(2)] [error] OV7251 only supports THE_480_P/THE_400_P resolutions, defaulting to THE_480_P
[stereo_inertial_node-2] [1844301061369F1200] [1.1.2] [1.062] [MonoCamera(1)] [error] OV7251 only supports THE_480_P/THE_400_P resolutions, defaulting to THE_480_P
[stereo_inertial_node-2] terminate called after throwing an instance of 'std::runtime_error'
[stereo_inertial_node-2]   what():  IMU(5) - IMU invalid settings!: IMU not detected. Your board doesn't have IMU or requires firmware update (Set imu.enableFirmwareUpdate(True) explicitly.). 1, 321
[ERROR] [stereo_inertial_node-2]: process has died [pid 6887, exit code -6, cmd '/opt/ros/humble/lib/depthai_examples/s

Hi, thanks for the information, could you also post results from running:

ros2 launch depthai_ros_driver camera.launch.py
ros2 launch depthai_ros_driver rgbd_pcl.launch.py
ros2 launch depthai_filters spatial_bb.launch.py

Per your request, posted terminal results for the 3 launch files. Evidence of IMU finding errors.May I ask another somewhat related question related to the cam-x parametersUsing the depthai-examples with an Oak-D-Lite, what is the orientation  of the launch file xyzrpy parameters relative to the case physical orientation. The ROS convention for robot models is FLU x=fwd y=left z=up. What direction is the camera xyz relative to its case.? Is it RDF x=down y=down z=fwd?Sent from Ross LunanOn Mar 4, 2024, at 3:12 AM, Adam Serafin @.***> wrote:
Hi, thanks for the information, could you also post results from running:
ros2 launch depthai_ros_driver camera.launch.py
ros2 launch depthai_ros_driver rgbd_pcl.launch.py
ros2 launch depthai_filters spatial_bb.launch.py
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

Hi, the fixes for IMU are on the main branch and should be released with the start of the new week. Regarding frame orientation, I am not sure if I exactly understand, roll, pitch and yaw in the launch file are used to orient the camera for attaching it to an external frame. Regarding the sensors themselves, you have a base sensor frame which uses ROS convention and an "optical" frame which corresponds to OpenCV one.

After a complete ros humble apt upgrade that included  depthai-ros upgrade today, June 22, 2024 which installed several upgrades , still getting the IMU error running the stereo-inertial launch file. Other examples work ok. I tried a calibration factory reset displaying version 0 00 but unable reset. Appreciate troubleshooting suggestions.

Seems, my imu detect problem is commented here related to perhaps older OakD cameras, such as mine which was a kickstarter version.
(https://discuss.luxonis.com/d/3422-depthai-ros-pointcloud-with-no-imu-oak-d-lite) . Can u suggest a means to set a param to force ignoring imu checking in the launch file?

Unresolved with  Release 2.9.0-1
launching starts up and throws a error.
ros2 launch depthai_examples stereo_inertial_node.launch.py camera_model:=OAK-D-LITE enableRviz:=False
[INFO] [launch]: All log files can be found below /home/ubuntu/.ros/log/2024-06-26-19-21-09-439160-rp4-ub22h-mt-5755
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [robot_state_publisher-1]: process started with pid [5768]
[INFO] [stereo_inertial_node-2]: process started with pid [5770]
[INFO] [component_container-3]: process started with pid [5772]
[robot_state_publisher-1] [INFO] [1719444070.769598717] [oak_state_publisher]: got segment oak-d-base-frame
.
.
[stereo_inertial_node-2]   what():  IMU(5) - IMU invalid settings!: IMU not detected. Your board doesn't have IMU or requires firmware update (Set imu.enableFirmwareUpdate(True) explicitly.). 1, 347
[ERROR] [stereo_inertial_node-2]: process has died [pid 5770, exit code -6, cmd '/opt/ros/humble/lib/depthai_examples/stereo_inertial_node --ros-args --params-file /tmp
Remaining nodes:
ubuntutbc@macvm-ub22h-bt:~$ ros2 node list
/container
/convert_metric_node
/launch_ros_5755
/oak_state_publisher
/point_cloud_xyzrgb_node
No camera image displayed on rqt_image_view
So closing this #495 and posting Issue on Forum

Hi, sorry for the delay, could you try running camera node (ros2 launch depthai_ros_driver camera.launch.py) while setting parameter camera.i_enable_imu: false?

Oak-D Lite ros2 launch depthai_ros_driver camera.launch.py camera.i_enable_imu:=false
ros2 launch depthai_ros_driver camera.launch.py camera.I_enable_imu:=false
[INFO] [launch]: All log files can be found below /home/ubuntu/.ros/log/2024-06-27-13-18-24-198729-rp4-ub22h-mt-10127
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [component_container-1]: process started with pid [10141]
[component_container-1] [INFO] [1719508705.739391560] [oak_container]: Load Library: /opt/ros/humble/lib/librobot_state_publisher_node.so
[component_container-1] [INFO] [1719508705.754612024] [oak_container]: Found class: rclcpp_components::NodeFactoryTemplate<robot_state_publisher::RobotStatePublisher>
[component_container-1] [INFO] [1719508705.754759246] [oak_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<robot_state_publisher::RobotStatePublisher>
[component_container-1] [INFO] [1719508705.785157045] [oak_state_publisher]: got segment oak
.
.
[component_container-1] [INFO] [1719509489.036545049] [oak]: Finished setting up pipeline.
[component_container-1] [ERROR] [1719509491.867887049] [oak_container]: Component constructor threw an exception: IMU(12) - IMU invalid settings!: IMU not detected. Your board doesn't have IMU or requires firmware update (Set imu.enableFirmwareUpdate(True) explicitly.). 0, 354
[ERROR] [launch_ros.actions.load_composable_nodes]: Failed to load node 'oak' of type 'depthai_ros_driver::Camera' in container '/oak_container': Component constructor threw an exception: IMU(12) - IMU invalid settings!: IMU not detected. Your board doesn't have IMU or requires firmware update (Set imu.enableFirmwareUpdate(True) explicitly.). 0, 354
*** NOTE NO Images Published
ubuntu@rp4-ub22h-mt:~$ ros2 node list
/launch_ros_9849
/oak_container
/oak_state_publisher
ubuntu@rp4-ub22h-mt:~$ ros2 topic list
/joint_states
/parameter_events
/robot_description
/rosout
/tf
/tf_static
ubuntu@rp4-ub22h-mt:~$ ros2 param dump /oak_state_publisher
/oak_state_publisher:
ros__parameters:
frame_prefix: ''
ignore_timestamp: false
publish_frequency: 20.0
qos_overrides:
/joint_states:
subscription:
depth: 5
history: keep_last
reliability: best_effort
/parameter_events:
publisher:
depth: 1000
durability: volatile
history: keep_last
reliability: reliable
/tf:
publisher:
depth: 100
durability: volatile
history: keep_last
reliability: reliable
/tf_static:
publisher:
depth: 1
history: keep_last
reliability: reliable
robot_description:

use_sim_time: false
ubuntu@rp4-ub22h-mt:~$ ros2 param dump /oak_container
^Cubuntu@rp4-ub22h-mt:~$ ros2 param dump /launch_ros_9849
/launch_ros_9849:
ros__parameters:
use_sim_time: false
ubuntu@rp4-ub22h-mt:~$

Some Progress with using a specific params_file:=no_imu on my Desktop
/oak:
ros__parameters:
camera:
i_enable_imu: false
i_enable_ir: false
ros2 launch depthai_ros_driver camera.launch.py model:=OAK-D-LITE params_file:=/home/ubuntu/Desktop/no_imu.yaml
[INFO] [launch]: All log files can be found below /home/ubuntu/.ros/log/2024-06-27-15-25-32-137462-rp4-ub22h-mt-6754
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [component_container-1]: process started with pid [6768]
[component_container-1] [INFO] [1719516333.590873623] [oak_container]: Load Library: /opt/ros/humble/lib/librobot_state_publisher_node.so
.
.
.
component_container-1] [INFO] [1719516337.189922001] [oak]: Device type: OAK-D-LITE
[component_container-1] [INFO] [1719516337.193936588] [oak]: Pipeline type: RGBD
[component_container-1] [INFO] [1719516337.309804026] [oak]: NN Family: mobilenet
[component_container-1] [INFO] [1719516337.515792725] [oak]: NN input size: 300 x 300. Resizing input image in case of different dimensions.
[component_container-1] [INFO] [1719516337.668190713] [oak]: Finished setting up pipeline.
[component_container-1] [INFO] [1719516340.787822902] [oak]: Camera ready!
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/oak' in container '/oak_container'
Nodes & Topics
ubuntu@rp4-ub22h-mt:~$ ros2 node list
/launch_ros_4939
/oak
/oak_container
/oak_state_publisher
ubuntu@rp4-ub22h-mt:~$ ros2 topic list
/diagnostics
/joint_states
/oak/nn/spatial_detections
/oak/rgb/camera_info
/oak/rgb/image_raw
/oak/rgb/image_raw/compressed
/oak/rgb/image_raw/compressedDepth
/oak/rgb/image_raw/theora
/oak/stereo/camera_info
/oak/stereo/image_raw
/oak/stereo/image_raw/compressed
/oak/stereo/image_raw/compressedDepth
/oak/stereo/image_raw/theora
/parameter_events
/robot_description
/rosout
/tf
/tf_static
$ rqt displays the images -- Yeh !

Bad news still a stereo_inertial_node  running the following script does not seem to pick up the no_imu.yaml
ros2 launch depthai_examples stereo_inertial_node.launch.py camera_model:=OAK-D-LITE enableRviz:=False params_file:=/home/ubuntu/Desktop/no_imu.yaml
[INFO] [launch]: All log files can be found below /home/ubuntu/.ros/log/2024-06-27-15-21-48-750362-rp4-ub22h-mt-6625
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [robot_state_publisher-1]: process started with pid [6638]
[INFO] [stereo_inertial_node-2]: process started with pid [6640]
[INFO] [component_container-3]: process started with pid [6642]
[robot_state_publisher-1] [INFO] [1719516110.040157263] [oak_state_publisher]: got segment oak-d-base-frame
[robot_state_publisher-1] [INFO] [1719516110.040532813] [oak_state_publisher]: got segment oak-d_frame
.
.
.
[stereo_inertial_node-2]   what():  IMU(5) - IMU invalid settings!: IMU not detected. Your board doesn't have IMU or requires firmware update (Set imu.enableFirmwareUpdate(True) explicitly.). 1, 347
[ERROR] [stereo_inertial_node-2]: process has died [pid 6640, exit code -6, cmd '/opt/ros/humble/lib/depthai_examples/stereo_inertial_node --ros-args --params-file /tmp/launch_params_68bgszd4 --params-file /tmp/launch_params_pxlewkof --params-fi blah blah blah
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)
[component_container-3] [INFO] [1719516124.242594469] [rclcpp]: signal_handler(signum=2)
[INFO] [robot_state_publisher-1]: process has finished cleanly [pid 6638]
[INFO] [component_container-3]: process has finished cleanly [pid 6642]
[robot_state_publisher-1] [INFO] [1719516124.242632826] [rclcpp]: signal_handler(signum=2)
ubuntu@rp4-ub22h-mt:~/Desktop$

Another Question regarding the  [Depthai] ROS Driver Docs: [https://docs.luxonis.com/software/ros/depthai-ros/driver/]
What is the script that displays the "Setting RGB Parameters" ?

I believe I can close this issue. A recent post on the Luxonis ROS forum stated that "Can't use stereo inertial node without IMU since that IMU is literally in the node name." I missed that obvious characterization. I also checked the stereo_inertial_publisher.cpp code where it  appears that the code expects an IMU in the camera and there is no smooth check otherwise other than crashing. I can use one of the other excellent Camera packages that publish depth topics for my robot application. Appreciate your assistance with getting the camera.launch.py to work using an no_imu.yaml.

Hi, stereo_inertial_node serves more as an example on how to develop applications rather than being a proper driver.

What is the script that displays the "Setting RGB Parameters" ?

Do you mean how to open that window? It is just dynamic_reconfigure plugin that should be a part of your rqt installation, if it is not available you can try installing ros-distro-rqt-common-plugins


findCharacterPos doesn't report the correct Y location

Prerequisite Checklist

[X] I searched for existing issues to prevent duplicates
[X] I searched for existing discussions on the forum to prevent duplicates
[X] I am here to report an issue and not to just ask a question or look for help (use the forum or Discord instead)

Describe your issue here
findCharacterPos is offsetting the Y position too high and reporting incorrect values.
Your Environment

OS / distro / window manager: linux / kde / x11
SFML version: 2.6.1
Compiler / toolchain: CMake sample project
Special compiler / CMake flags: N/A

Steps to reproduce
Run this code:
#include "SFML/Graphics/CircleShape.hpp"
#include "SFML/Graphics/Color.hpp"
#include "SFML/Graphics/Font.hpp"
#include "SFML/Graphics/Rect.hpp"
#include "SFML/Graphics/RectangleShape.hpp"
#include "SFML/Graphics/RenderWindow.hpp"
#include "SFML/Graphics/Text.hpp"
#include "SFML/System/Vector2.hpp"
#include "SFML/Window/Event.hpp"
#include "SFML/Window/VideoMode.hpp"
#include <cstddef>
#include <cstdio>
#include <optional>

void print_float_rect(const sf::FloatRect &rect) {
  printf("top: %lf left: %lf width: %lf height: %lf\n", rect.top, rect.left,
         rect.width, rect.height);
}

void print_float_vector(const sf::Vector2f &vec) {
  printf("x: %lf y:%lf\n", vec.x, vec.y);
}

std::optional<float> get_character_width_at_idx(const sf::Text &text,
                                                size_t idx) {
  float width = text.findCharacterPos(idx + 1).x - text.findCharacterPos(idx).x;
  if (width < 0) {
    return {};
  }

  return {width};
}

int main() {
  sf::RenderWindow window(sf::VideoMode(200, 200), "SFML Works!");
  window.setFramerateLimit(60);

  sf::Font font;
  if (!font.loadFromFile("SourceCodePro-SemiBold.ttf")) {
    printf("Failed to load font!\n");
    return 1;
  }

  sf::Text text;
  text.setFont(font);
  text.setCharacterSize(32);
  text.setString("M");
  text.setPosition(sf::Vector2f(100, 100));

  sf::CircleShape mouse_dot;
  mouse_dot.setFillColor(sf::Color::Red);
  float radius = 3;
  mouse_dot.setRadius(radius);
  mouse_dot.setOrigin(radius / 2, radius / 2);
  mouse_dot.setPosition(sf::Vector2f(-100, -100));

  sf::RectangleShape letter_box;
  letter_box.setOutlineColor(sf::Color::Blue);
  letter_box.setOutlineThickness(2);
  letter_box.setFillColor(sf::Color::Transparent);
  letter_box.setPosition(sf::Vector2f(-100, -100));

  while (window.isOpen()) {
    sf::Event event;
    while (window.pollEvent(event)) {
      switch (event.type) {
      case sf::Event::Closed:
        window.close();
        break;
      case sf::Event::MouseButtonPressed: {
        sf::Vector2f position(event.mouseButton.x, event.mouseButton.y);
        sf::Vector2f char_pos = text.findCharacterPos(0);
        sf::FloatRect rect(char_pos.x, char_pos.y,
                           get_character_width_at_idx(text, 0).value_or(0),
                           text.getGlobalBounds().height);

        print_float_rect(rect);
        print_float_vector(position);
        printf("letter contains mouse %s\n",
               rect.contains(position) ? "true" : "false");

        letter_box.setSize(rect.getSize());
        letter_box.setPosition(rect.getPosition());
        mouse_dot.setPosition(position);
      } break;
      default:
        break;
      }
    }
    window.clear(sf::Color::Black);
    window.draw(text);
    window.draw(mouse_dot);
    window.draw(letter_box);
    window.display();
  }

  return 0;
}

Expected behavior
That blue box around the letter should actually be around the letter.
Actual behavior
The blue box is offset up due to an incorrect calculation from findCharacterPos

I am not sure this is a bug. I think there is a misunderstanding of what findCharacterPos is doing. Probably the documentation is too vague.
You can achieve what you want with glyph bounds provided by the font.
Example:
#include <SFML/Graphics.hpp>

int main() {
  sf::RenderWindow window(sf::VideoMode(400, 400), "SFML Works!");
  window.setFramerateLimit(60);
  window.setView(sf::View(sf::FloatRect({}, {100, 100})));

  sf::Font font;
  if (!font.loadFromFile("SourceCodePro-SemiBold.ttf")) {
    return 1;
  }

  sf::Text text("M", font, 32);
  text.setPosition({50.f, 10.f});
  text.setScale({2.f, 2.f});
  text.setRotation(20.f);
  const sf::FloatRect glyphBounds =
      font.getGlyph(text.getString()[0], text.getCharacterSize(), false).bounds;

  sf::RectangleShape box;
  box.setOutlineColor(sf::Color::Blue);
  box.setOutlineThickness(2);
  box.setFillColor(sf::Color::Transparent);
  // relative to text coordinate system
  box.setPosition(text.getInverseTransform() * text.findCharacterPos(0) +
                  sf::Vector2f(0, static_cast<float>(text.getCharacterSize())) +
                  glyphBounds.getPosition());
  box.setSize(glyphBounds.getSize());
  const sf::FloatRect boxRect(box.getPosition(), box.getSize());

  while (window.isOpen()) {
    for (sf::Event event; window.pollEvent(event);) {
      switch (event.type) {
      case sf::Event::Closed:
        window.close();
        break;
      case sf::Event::MouseMoved: {
        const sf::Vector2i mouseInWindow(event.mouseMove.x, event.mouseMove.y);
        const sf::Vector2f mouseInWorld =
            window.mapPixelToCoords(mouseInWindow);
        const sf::Vector2f mouseInText =
            text.getInverseTransform() * mouseInWorld;
        box.setOutlineColor(boxRect.contains(mouseInText) ? sf::Color::Green
                                                          : sf::Color::Blue);
      } break;
      default:
        break;
      }
    }

    window.clear();
    window.draw(text);
    window.draw(box, text.getTransform());
    window.display();
  }
}

For reference, this is the documentation you are talking about: https://www.sfml-dev.org/documentation/2.6.1/classsf_1_1Text.php#a2e252d8dcae3eb61c6c962c0bc674b12
It says it applies all transformations including translation. Currently it doesn't look like it is applying the local bound translation, hence why I added it. Also, it seems a little weird from a user perspective that I have to do all of that to find the actual character position. If the current implementation is correct, wouldn't that suggest we should rename the function?

I am not sure this is a bug. I think there is a misunderstanding of what findCharacterPos is doing. Probably the documentation is too vague.
You can achieve what you want with glyph bounds provided by the font. Example:
#include <SFML/Graphics.hpp>

int main() {
  sf::RenderWindow window(sf::VideoMode(400, 400), "SFML Works!");
  window.setFramerateLimit(60);
  window.setView(sf::View(sf::FloatRect({}, {100, 100})));

  sf::Font font;
  if (!font.loadFromFile("SourceCodePro-SemiBold.ttf")) {
    return 1;
  }

  sf::Text text("M", font, 32);
  text.setPosition({50.f, 10.f});
  text.setScale({2.f, 2.f});
  text.setRotation(20.f);
  const sf::FloatRect glyphBounds =
      font.getGlyph(text.getString()[0], text.getCharacterSize(), false).bounds;

  sf::RectangleShape box;
  box.setOutlineColor(sf::Color::Blue);
  box.setOutlineThickness(2);
  box.setFillColor(sf::Color::Transparent);
  // relative to text coordinate system
  box.setPosition(text.getInverseTransform() * text.findCharacterPos(0) +
                  sf::Vector2f(0, static_cast<float>(text.getCharacterSize())) +
                  glyphBounds.getPosition());
  box.setSize(glyphBounds.getSize());
  const sf::FloatRect boxRect(box.getPosition(), box.getSize());

  while (window.isOpen()) {
    for (sf::Event event; window.pollEvent(event);) {
      switch (event.type) {
      case sf::Event::Closed:
        window.close();
        break;
      case sf::Event::MouseMoved: {
        const sf::Vector2i mouseInWindow(event.mouseMove.x, event.mouseMove.y);
        const sf::Vector2f mouseInWorld =
            window.mapPixelToCoords(mouseInWindow);
        const sf::Vector2f mouseInText =
            text.getInverseTransform() * mouseInWorld;
        box.setOutlineColor(boxRect.contains(mouseInText) ? sf::Color::Green
                                                          : sf::Color::Blue);
      } break;
      default:
        break;
      }
    }

    window.clear();
    window.draw(text);
    window.draw(box, text.getTransform());
    window.display();
  }
}

Also i really think it's a bug now that I've done more digging. If you look at my test code in the PR, you will see the code I'm using to run this test.
So the blue box is an sf::Rect that uses the global bounds from the text object to represent itself. This is what it looks like:

But with the current 2.6.x code, whenever you use the value from "findCharacterPos" as the top left corner of your rect that surrounds the character, you get this:

I don't think it makes sense for the return value of the "top left" coordinate to be above the global bounds value that you get from rect.
For reference, if you do the fix lapinozz suggests in the PR I opened, you will see the top left corner match the global bounds top left corner. This is a picture running the same exact test code, but with the SFML fix:

I really think it's a bug here and not a documentation issue.

For reference, if you do the fix lapinozz suggests in the PR I opened, you will see the top left corner match the global bounds top left corner.

This works for the first letter but it is wrong in general.
Example running your test code with your suggested fix when the first character is an underscore.

Consider the following program and a corresponding screenshot.
I think findCharacterPos current behavior is valid and useful to position a vertical cursor in a text field or to highlight selected text. I use it to draw the background pattern in my example below. Note it also gives a sensible output for the space character.
One problem I see is that having a local position would be more useful that a global position when there is some rotation (that is why I transform findCharacterPos output with text.getInverseTransform()), but returning global position is the documented behavior so all good.
To get a tight bounding box on a specific character, glyph bounds give the needed information.
#include <SFML/Graphics.hpp>

int main()
{
    auto window = sf::RenderWindow{sf::VideoMode{800, 600}, "Text", sf::Style::Default};
    window.setFramerateLimit(60);

    auto font = sf::Font{};
    if (!font.loadFromFile("resources/tuffy.ttf"))
        return 1;

    constexpr auto characterSize = 200;

    auto text = sf::Text{L"ïyÏ~Ô @!", font, characterSize};
    text.setPosition(100.f, 100.f);
    text.setRotation(10.f);

    auto backgroundRects = std::vector<sf::RectangleShape>{};
    for (auto i = std::size_t{}; i < text.getString().getSize(); i++)
    {
        const auto position = text.getInverseTransform() * text.findCharacterPos(i);
        const auto next     = text.getInverseTransform() * text.findCharacterPos(i + 1);
        const auto size     = sf::Vector2f{next.x - position.x, font.getLineSpacing(characterSize)};
        auto&      rect     = backgroundRects.emplace_back(size);
        rect.setPosition(position);
        rect.setFillColor(i % 2 ? sf::Color{64, 64, 0} : sf::Color{0, 64, 64});
    }

    auto letterBounds = std::vector<sf::RectangleShape>{};
    for (auto i = std::size_t{}; i < text.getString().getSize(); i++)
    {
        const auto bounds   = font.getGlyph(text.getString()[i], characterSize, false).bounds;
        const auto position = text.getInverseTransform() * text.findCharacterPos(i) + sf::Vector2f{0.f, characterSize} +
                              bounds.getPosition();
        auto& rect = letterBounds.emplace_back(bounds.getSize());
        rect.setPosition(position);
        rect.setFillColor(sf::Color::Transparent);
        rect.setOutlineColor(sf::Color::Green);
        rect.setOutlineThickness(1.f);
    }

    auto textBounds = sf::RectangleShape{};
    {
        const auto bounds = text.getLocalBounds();
        textBounds.setPosition(bounds.getPosition());
        textBounds.setSize(bounds.getSize());
        textBounds.setFillColor(sf::Color::Transparent);
        textBounds.setOutlineColor(sf::Color::Red);
        textBounds.setOutlineThickness(1.f);
    }

    while (window.isOpen())
    {
        for (auto event = sf::Event{}; window.pollEvent(event);)
            if (event.type == sf::Event::Closed)
                window.close();

        window.clear();
        for (const auto& rect : backgroundRects)
            window.draw(rect, text.getTransform());
        window.draw(text);
        for (const auto& bounds : letterBounds)
            window.draw(bounds, text.getTransform());
        window.draw(textBounds, sf::RenderStates{sf::BlendAdd, text.getTransform(), nullptr, nullptr});
        window.display();
    }

    return 0;
}

I'm going to create a different PR targetting master that has a way to fetch an axis aligned bounding box of a character in a sf::Text

@eXpl0it3r could you remove the bug tag and change the milestone. I agree with kimci here about this. I see the issue he is talking about. I think having a feature as described in my previous comment would be better

For reference, if you do the fix lapinozz suggests in the PR I opened, you will see the top left corner match the global bounds top left corner.

This works for the first letter but it is wrong in general. Example running your test code with your suggested fix when the first character is an underscore.

Consider the following program and a corresponding screenshot.
I think findCharacterPos current behavior is valid and useful to position a vertical cursor in a text field or to highlight selected text. I use it to draw the background pattern in my example below. Note it also gives a sensible output for the space character. One problem I see is that having a local position would be more useful that a global position when there is some rotation (that is why I transform findCharacterPos output with text.getInverseTransform()), but returning global position is the documented behavior so all good.
To get a tight bounding box on a specific character, glyph bounds give the needed information.
#include <SFML/Graphics.hpp>

int main()
{
    auto window = sf::RenderWindow{sf::VideoMode{800, 600}, "Text", sf::Style::Default};
    window.setFramerateLimit(60);

    auto font = sf::Font{};
    if (!font.loadFromFile("resources/tuffy.ttf"))
        return 1;

    constexpr auto characterSize = 200;

    auto text = sf::Text{L"ïyÏ~Ô @!", font, characterSize};
    text.setPosition(100.f, 100.f);
    text.setRotation(10.f);

    auto backgroundRects = std::vector<sf::RectangleShape>{};
    for (auto i = std::size_t{}; i < text.getString().getSize(); i++)
    {
        const auto position = text.getInverseTransform() * text.findCharacterPos(i);
        const auto next     = text.getInverseTransform() * text.findCharacterPos(i + 1);
        const auto size     = sf::Vector2f{next.x - position.x, font.getLineSpacing(characterSize)};
        auto&      rect     = backgroundRects.emplace_back(size);
        rect.setPosition(position);
        rect.setFillColor(i % 2 ? sf::Color{64, 64, 0} : sf::Color{0, 64, 64});
    }

    auto letterBounds = std::vector<sf::RectangleShape>{};
    for (auto i = std::size_t{}; i < text.getString().getSize(); i++)
    {
        const auto bounds   = font.getGlyph(text.getString()[i], characterSize, false).bounds;
        const auto position = text.getInverseTransform() * text.findCharacterPos(i) + sf::Vector2f{0.f, characterSize} +
                              bounds.getPosition();
        auto& rect = letterBounds.emplace_back(bounds.getSize());
        rect.setPosition(position);
        rect.setFillColor(sf::Color::Transparent);
        rect.setOutlineColor(sf::Color::Green);
        rect.setOutlineThickness(1.f);
    }

    auto textBounds = sf::RectangleShape{};
    {
        const auto bounds = text.getLocalBounds();
        textBounds.setPosition(bounds.getPosition());
        textBounds.setSize(bounds.getSize());
        textBounds.setFillColor(sf::Color::Transparent);
        textBounds.setOutlineColor(sf::Color::Red);
        textBounds.setOutlineThickness(1.f);
    }

    while (window.isOpen())
    {
        for (auto event = sf::Event{}; window.pollEvent(event);)
            if (event.type == sf::Event::Closed)
                window.close();

        window.clear();
        for (const auto& rect : backgroundRects)
            window.draw(rect, text.getTransform());
        window.draw(text);
        for (const auto& bounds : letterBounds)
            window.draw(bounds, text.getTransform());
        window.draw(textBounds, sf::RenderStates{sf::BlendAdd, text.getTransform(), nullptr, nullptr});
        window.display();
    }

    return 0;
}

So after looking at this image, I ask myself if people really want a feature like this. For me, I don't need this. If I'm the only one advocating for something like this, then we shouldn't add more features than necessary. I was definitely using / expecting the wrong things from the "findCharacterPos" function. It's truly finding the glyph's charactar position which seems like that is what it really should do. Whenever I was comparing it to the text's global bounds, it made it look weird. Thing is, that wasn't the point of the function. I definitely think there could be some more touching up in the documentation as to what this function does specifically.

Looking at the refactoring from local coordinates to global coordinates, it seems suspicious that Y is never updated for "normal" characters, but only special characters.
While the calculation is still for local bounds first and then transformed to global coordinates afterwards, I wonder whether we shouldn't still consider the vertical spacing for the local bounds for normal charaters.
https://github.com/SFML/SFML/commit/5bae08a2d8d0dba34268150d96071a4546ab49c5#diff-22c1fd53bbab429b4a348662278b21abb1d7a063aa14b175a8f3a5451c783b6cR152-R193

This seems related to #2172, i.e. lacking documentation on font metrics.

This pr addresses that the findcharactarpos will return the top of the line position.


Fix RSpec/EmptyExampleGroup to ignore examples in invalid scopes

Fixes https://github.com/rubocop-hq/rubocop-rspec/issues/864.
Previously any example inside an example group would cause this Cop to pass, even if the example was inside an invalid scope.
Because RSpec will not execute any code inside an example group unless it has an example, there was no way to catch this error.

Before submitting the PR make sure the following are checked:

[x] Feature branch is up-to-date with master (if not - rebase it).
[x] Squashed related commits together.
[x] Added tests.
[x] Added an entry to the changelog if the new code introduces user-observable changes.
[x] The build (bundle exec rake) passes (be sure to run this locally, since it may produce updated documentation that you will need to commit).

You are facing an issue with this cop failing to detect examples defined in iterators in a spec that you didn't touch.
expected_rewrites.each do |old, new|
    it %(rewrites "#{old}" as "#{new}") do

It's hard to disagree since there's this guideline https://rspec.rubystyle.guide/#it-in-iterators
On the one hand, it's not this cop's business, and on the other hand there's no other cop to enforce that.
Even though my hands are itching to rewrite that spec, I can imagine other users of RuboCop RSpec being hit by a wave of offences from this cop for defining examples in iterators, which is not really fair.
How do you feel about taking a stab at improving the cop so that it detects examples inside iterators? I can help out if you get stuck with this.

@mlarraz Did you have a chance to look at it?

@mlarraz Ping

@mlarraz A gentle reminder.

Apologies, I've been been swamped and haven't really had time to look into this more. Will try to take another look this weekend

@mlarraz Poke

Ping

Github is super-slow when pushing changes to author's branch:
To github.com:mlarraz/rubocop-rspec.git
 + 3d0deae...e28300d validate_scope -> validate_scope (forced update)

Still not reflected in the branch or here in the pull request. :angel:/l/r/
I've added the detection of examples inside iterators, and such example groups are not flagged now.
Used a selective recursive node pattern. We need to make node pattern language Turing complete already.

Rebased. @bquorning @Darhazer please take a look.

@Darhazer @bquorning Naming node matchers was the hardest part, did my best, but open to better suggestions.

I've just realized the following:
          context "when a third thing is true" do
       +  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Empty example group detected.
            it_behaves_like "some thingy" do
              let(:a) { 'foo' }
            end

(but it works ok with a blockpass).

Please take another look @bquorning @Darhazer

Minor touches to specs: removed a duplicate spec, changed "does not flag" to "ignores".

Ping.

Alarming ping @bquorning @Darhazer

@bquorning ping


Is it possible to use django-two-factor-auth with django-rest-knox? Is there a guide somewhere?

I have a Django app which uses standard Django username/password login for authentication. I've integrated django-two-factor-auth into this login flow.
Now, I'm transitioning the app to a SPA (still built in Django).
So I'd like to use django-rest-knox for authentication. But I want to keep the 2FA functionality.
Is this possible? If so, is there some kind of documentation or tutorial?

I would suggest asking this on Django forums.


Tick number is not formatted correctly

There are 3 "1B" ticks. I believe it's just a format issue. :+1:

thanks


Correct k3d docs to reference only a single cluster instead of msultiple workload cluster

What type of suggestions?
Wrong Information
What page is concerned?
https://kubefirst.konstruct.io/docs/k3d/overview
What version of the docs?
2.3+
What is the issue?
The <= 2.2 version of the k3d quickstart correctly stated that:

The k3d provisioning process will:
Create a multinode k3d Kubernetes cluster on your localhost.

This is indeed what currently happens. I actually just ran the k3d setup as of 12/8/2024 (kubefirst v2.7) and you can see that there is a single cluster created, but multiple k3s nodes are created to run the workloads across development/staging/production namespaces
The issue however, is that in the 2.3+ version of the documentation, this second bulletpoint is now included, which is not correct.

Create three virtual workload clusters for each default environment (development, staging & production).

I spent about 30 minutes poking around at my local setup trying to find the "workload clusters", until I came across this slack thread confirming my suspicions that there is a single cluster
Code of Conduct

[X] I agree to follow this project's Code of Conduct

I took a quick peek at a PR for this, however it looks like this verbiage is actually coming from the _provision-process.mdx template which is used in the "Overview" page for each cloud, so may be a bit of a refactor to exclude just one cloud (k3d).
Is it correct to say that k3d is the only cloud for which the statement "Creates three virtual workload clusters..." is false? May influence a refactor

@ikegentz: thanks for reporting this issue and working on a PR. It's somewhat true as it is not on available on all beta clouds yet (but it will be mentioned in the limitation section of their overview page if it's not available), but it's also true that once all clouds are out of beta, k3d is the only one that won't have workload clusters.
Once you are ready for a PR, our Technical Writer @konstructcarrie will review it, thanks.

@ikegentz: sorry we didn't wait for the PR you were working on. Still, contact me on our Slack community (I'm Fred): I would like you send you some swag as a token of our appreciation!

Haha no worries, I hadn't taken time to work on it so nothing time lost on my end. Thanks for getting this clarified in the docs!

Thanks for hopping on this so fast! I did take a look at the PR; I guess as someone using Kubefirst for the first time, I actually really like the original verbiage:

Create three virtual workload clusters for each default environment (development, staging & production).

I think that is clear about what all gets created, so IMO it is a net loss to remove it from all references in docs. I created a PR that instead updates only the k3d pages to hopefully make it more clear that k3d is the only one that's different.

@ikegentz: the change @konstructcarrie did is correct. There is a difference between what we discussed and what the docs was saying. I realized I may nt have formulated it correctly, but the point I wanted to make is that only public cloud support workload clusters (and some in beta), but not k3d. We also don't create three virtual clusters by default anymore, so it's why we removed this sentence from the docs. Maybe a better way would have been to replace it with something like "possibility to create workload clusters" in the overview page, but I'll defer to @konstructcarrie, our Technical Writer, to follow up on this.

@ikegentz: the change @konstructcarrie did is correct. There is a difference between what we discussed and what the docs was saying. I realized I may nt have formulated it correctly, but the point I wanted to make is that only public cloud support workload clusters (and some in beta), but not k3d. We also don't create three virtual clusters by default anymore, so it's why we removed this sentence from the docs. Maybe a better way would have been to replace it with something like "possibility to create workload clusters" in the overview page, but I'll defer to @konstructcarrie, our Technical Writer, to follow up on this.

Thanks for the clarification @fharper, that makes more sense now. Happy to amend that PR if there is some other phrasing is useful or whatnot. I like at least mentioning the workload clusters since that can have an impact on cloud spend and it's useful to know the overall infrastructure footprint that's being created

The cloud spends will only increase if the user manually create a workload cluster, or do any other actions that require more cloud resources, so it's not by default. As I mentioned, we used to create three workload clusters by default, but we don't anymore so there is nothing else to add to the documentation. The overview section in each cloud is specific to what Kubefirst do automatically, not everything else you can do with the platform, so unfortunately, I think your PR isn't needed at all. Thanks again for proposing and helping 🙌
I always suggest that people discuss with us before doing a substantial PR like yours to prevent someone working on something that may not be needed, sorry about that. Check https://github.com/konstructio/kubefirst-docs/blob/main/CONTRIBUTING.md#ways-to-contribute for more information :)


Added DrawTextRecEx()

Improved the code for DrawTextRec() and added the ability for selecting text renaming it DrawTextRecEx(). DrawTextRec() now directly calls DrawTextRecEx().
You can drop the Ex if you don't think it's necessary.

Another amazing addition @Demizdor! Thank you very much!
Just merging for now... I'll probably review naming later on! :)


docstring recall

Summary
Write docstring in each function in TimeSeriesRecall.
Format:
"""Description
  Args:
      args1: type
          Description
      args2: type
          Description
  Returns:
      type: Description
"""

Goal
Write docstrings of TimeSeriesRecall
Todo
Write docstring of

[x] TimeSeriesPrecision class
[x] init
[x] score
[x] _update_recall

Deadline
2020 / 12 / 30
Parent issue
If the parent issue exists, post a link here.
References
If there are any reference links, they are described here.
Notes
Example:
"""The function of selecting the gamma value according to the parameters.
  Args:
      gamma: str
          - 'one': the value 1
          - 'reciprocal';: a reciprocal of the overlap
          - 'udf_gamma': user defined gamma
      overlap: int
          overlap between real and pred
  Returns:
      float: the selected gamma
"""

@ryoherisson

#42


ci: automate releases

This PR lets us automate the process of releasing new versions using Google's Release Please Github action. It works by creating (and maintaining) a "release PR" which, when merged, will update the changelog, bump the version number, and upload our source distribution and wheel to PyPI.
how is the version number determined?
The version number is determined automatically according to 1) semantic versioning and 2) the titles of each PR (which should follow the conventional commits spec). For example, if all of the recently merged PRs are prefixed with fix: , then the system will infer that all recent changes have been bug fixes, so it will only bump the "patch" version. However, if even one of the recently merged PRs is prefixed with feat: , then the system will bump the "major" version because it will infer that a new feature has been added to master.
This makes our versioning more interpretable to our users while also redistributing the work of maintaining the version onto each developer of our toolkit.
how is the changelog maintained?
The changelog for each release is simply the contents of the text body of the release PR. These text entries will themselves come from the titles of each of the PRs that have been merged since the last release. For example, this is what the changelog entry would look like if the following two PRs were merged into master since the last release:

fix: NoneType error in Haplotypes.__iter__
fix: precision of phenotypes written to pheno file

Here is also a more recent example.
some caveats

we will need to require that PRs get squashed in order for this to work. imo this makes the git history cleaner and easier to follow, anyway
every PR that gets merged into master will have to have a prefix attached to it's title that follows the conventional commits spec. For example, if the PR is a bug fix, it will need to be prefixed by fix: . Or, if it is a new feature, it will need to prefixed by feat: . I've added another Github action to prevent merging of PRs that don't have this
I had to convert the RELEASE_NOTES.rst file into a CHANGELOG.md file because the release please github action only supports markdown. This meant that I also had to remove the file from our documentation, but I could try to figure out if there's a way to still link to it, if we'd like

other, somewhat unrelated, things in this PR

adds py3.7 testing to the CI! hoorah! 🎉 I actually got it to work
uses "stable" instead of "latest" to refer to docs (in https://github.com/gymrek-lab/TRTools/pull/201/commits/94b39a5e5ae8fd6ae2cf98f2cf75a7b8cb3e7330), since "latest" may refer to unreleased code that is sitting on master
moves configuration in pytest.ini and .pylintrc into the pyproject.toml

Hey Arya, thanks for doing this!
Some minorish points:
I personally liked having a detailed change log, explaining everything that's happening. Having it just be one-liners that link to PRs means you have to go digging to figure out what actually changed. Is there a way to copy the bodies of the PRs into the changelog in addition to the one line summaries?
Regardless of the above, having PRs be self documenting for the change log is a big change for my own PR style and presumably a change for many other lab members. Normally I write them either sloppily, not thinking they'll be looked at much, or I write them in a detailed way for the reviewer. Now I'll need to write them for an unknown future audience with little presumed background so they can understand it as part of the changelog history. If we're making this change, we need these new requirements of PR etiquette to be very clearly stated somewhere in the TRTools documentation, and we should make a brief announcement to the lab that everyone will need to change their PR style. Wherever we document this, we also need to state that in a PR, if the if the scope of the PR changes, the original PR commit message will need to be edited to be kept up to date. People shouldn't have to read through the conversation history of a PR to understand what happened, and now they can't look to a manually written changelog for that purpose.
Between steps 2 & 3 in PUBLISHING.rst there should be a description of what the person doing the review should be looking for. I would at least have them make sure that the changes have been documented appropriately in that PR. I'm open to having other review tasks their as well if you can think of some.
Instead of deleting the release notes page, can we just have it consist of a single line link to the CHANGELOG on the github repo?

Thanks for writing out all of your thoughts, @LiterallyUniqueLogin !
I agree that one liners aren't ideal because they require extra digging. I don't know if there's a way to include the entire PR body in the release notes, but one thing that I forgot to mention is that you can edit the contents of the text body of the release PR before it gets merged. And whatever you include there will get included in the CHANGELOG. I haven't used this (somewhat undocumented?) feature yet myself, but you can see an example of it in the release notes for Snakemake 8.0, which also uses the release-please GitHub action. So we can still manually write the CHANGELOG, if we'd like.

Regarding your broader point about PR etiquette:
I think a lot of projects have pull request templates to help encourage PR etiquette. People generally include checklists and guidelines for the person writing the PR. For examples, here are snakemake's and haptools'. Maybe we could create one for TRTools? That might be a better way to target our communication to people who make PRs for TRTools?
I'm glad you also brought up guidelines for reviewers because I often struggle to identify the best way to review a PR myself. I'll try to add a section to the TRTools docs with a list of suggestions for PR reviewers, but I would feel better if it was the result of a broader conversation with others in the lab, perhaps on our Slack. I also think it would be nice to have some documentation, perhaps on the lab wiki?, that lists some general suggestions for pull request creators and editors, since a lot of this will also apply to haptools and other projects in our lab. What do you think?

All good points! You really know your way around github best practices, that's a very useful skill. How about this then,
Three more changes for this PR:

Can you create a PR template for TRTools. It should mention

the conventional commits spec, maybe a brief example
The PR should be legible for unknown future audience with little presumed background that are trying to understand TRTool's changelog history
The PR author should keep the main PR title/body up to date if the scope of the PR changes
Any other points you find helpful (especially from your Haptools experience).

a short blurb in the TRTools contributing section saying PR reviewers should be looking to check that the PR conforms to the template guidelines in their reviewing (or edit the PR into line themselves), in addition to reviewing the code
a short blurb in the publishing section saying that the publisher should edit the auto-generated text-body of the PR release to incorporate additional details from the underlying PRs as needed.

and then this PR should be good to go.
Outside of this PR, we can chat with Melissa and decide if we want lab-wide PR creation/review guidelines, and if so, do we want to write them up for the lab wiki and/or solicit feedback.

done! thank you for all of the comments and suggestions, @LiterallyUniqueLogin !
And regarding chatting with Melissa about lab-wide PR creation/review guidelines: that sounds like a good plan


dithSerp palette issue

If dithSerp is set to true it seems to introduce colors that are not in the palette for small palettes, repro:
const createCanvas = require('canvas');
const canvas = createCanvas(204, 204);
const ctx = canvas.getContext('2d');
ctx.fillStyle = 'white';
ctx.fillRect(0, 0, canvas.width, canvas.height);

ctx.font = '30px Impact';
ctx.rotate(0.1);
ctx.fillStyle = 'black';
ctx.fillText('Awesome!', 50, 100);

// quantitize
const RgbQuant = require('rgbquant');
const q = new RgbQuant({colors: 16, dithKern: 'FloydSteinberg', dithSerp: true});
q.sample(canvas);
const pal = q.palette(true);
const out = q.reduce(canvas);

The palette now contains:
[ [ 0, 0, 0 ],
  [ 17, 17, 17 ],
  [ 27, 27, 27 ],
  [ 38, 38, 38 ],
  [ 54, 54, 54 ],
  [ 75, 75, 75 ],
  [ 86, 86, 86 ],
  [ 103, 103, 103 ],
  [ 126, 126, 126 ],
  [ 137, 137, 137 ],
  [ 154, 154, 154 ],
  [ 169, 169, 169 ],
  [ 194, 194, 194 ],
  [ 218, 218, 218 ],
  [ 231, 231, 231 ],
  [ 255, 255, 255 ] ]

the colors of out are (unordered):
[ [ 255, 255, 255, 255 ],
  [ 231, 231, 231, 255 ],
  [ 0, 0, 0, 255 ],
  [ 17, 17, 17, 255 ],
  [ 38, 38, 38, 255 ],
  [ 54, 54, 54, 255 ],
  [ 86, 86, 86, 255 ],
  [ 103, 103, 103, 255 ],
  [ 137, 137, 137, 255 ],
  [ 169, 169, 169, 255 ],
  [ 194, 194, 194, 255 ],
  [ 126, 126, 126, 255 ],
  [ 218, 218, 218, 255 ],
  [ 75, 75, 75, 255 ],
  [ 154, 154, 154, 255 ],
  [ 27, 27, 27, 255 ],
  [ 253, 253, 253, 255 ] ]

The last entry is not in the palette. If you add more colors or gradients to the original image, more spurious colors will pop up. Is this a missing/misplaced nearest color matching in reduce?

honestly, i think dithSerp is not implemented correctly to begin with. it's supposed to give better results, but instead looks worse. try the pool table image [1] at 16 colors with Floyd and then with Floyd + dithSerp.
the original dithering code was adapted from here [2] and even there, there's a comment questioning whether the hz kernel offsets should be reversed or not. it made sense to me to do this because the idea of error diffusion is never to spread the error to already processed pixels and if you're alternating the scan direction without reflecting the kernel horizontally, you're doing exactly that.
i think the dithering code in general needs a careful review, which i never really did given that the results looked subjectively correct.
[1] http://leeoniya.github.io/RgbQuant.js/demo/
[2] https://github.com/leeoniya/RgbQuant.js/blob/master/src/rgbquant.js#L140

if you need to use it today, i would avoid using dithSerp until the code has been reviewed. i'm pretty busy right now, so it could be a week or two before i can dive into it.
if you have any spare cycles and want to try reviewing the dithering loop yourself, go ahead. it's not super complicated, just needs to be carefully reviewed. you can use these as references: [1] [2].
the meat of the dither step is just 70 lines: https://github.com/leeoniya/RgbQuant.js/blob/master/src/rgbquant.js#L241-L310
[1] http://www.tannerhelland.com/4660/dithering-eleven-algorithms-source-code/
[2] https://en.wikipedia.org/wiki/Floyd–Steinberg_dithering

@leeoniya Will see if I find some time to look into it.
For now I do a second ED calculation to get rid of the suprious colors. You can already test this in a SIXEL capable terminal (like xterm started with xterm -ti vt340) by running img2sixel.js like this:
node img2sixel.js -p16 http://leeoniya.github.io/RgbQuant.js/demo/img/bluff.jpg

:smile_cat:

it made sense to me to do this because the idea of error diffusion is never to spread the error to already processed pixels and if you're alternating the scan direction without reflecting the kernel horizontally, you're doing exactly that.

@leeoniya So the kernel should be reflected for serpentine dither, every time you go in reverse right? I'm implementing my own dithering library and I can't find any information on this. I know you're having trouble here, did you figure it out? In any case I can't see how not reflecting it would be a good idea.

yes, i think so. you can see that all the kernels are arranged with nothing to north or west of X, which would imply eastwards and southwards iteration. if you're reversing along x, then the kernel need to be x-reflected.
https://hbfs.wordpress.com/2013/12/31/dithering/

Ok, thanks! And that's a helpful link.
Here, I just implemented serpentine dithering. Can't be 100% sure I'm doing it right, but I think I am.
Simple 2D matrix regular:

Simple 2D matrix serpentine:

Make sure to view these images at 100% size. The serpentine definitely looks smoother.
Not sure if that helps anything, but it might be useful as a reference for creating a black and white gradient test case.

nice :)

it does feel like serpentine may not provide the best "improvement" since it's pretty directional. you may want to look into Riemersma Dither, particularly one that follows a Hilbert space-filling curve. this might give you less directional dithering.
https://www.compuphase.com/riemer.htm
https://www.compuphase.com/hilbert.htm
i think igor implemented this in his RgbQuant offshoot: https://github.com/ibezkrovnyi/image-quantization
also, here is way too much additional dithering info: https://bisqwit.iki.fi/story/howto/dither/jy/

Yep, I'm aware of those methods and plan on implementing them later. I just also wanted to have serpentine available.


added sarbbottam to the contributor's list

added sarbbottam to the contributor's list

Current coverage is 72.72%

Merging #11 into master will not affect coverage as of 65e146b

@@            master     #11   diff @@
======================================
  Files            2       2
  Stmts           22      22
  Branches         0       0
  Methods          0       0
======================================
  Hit             16      16
  Partial          0       0
  Missed           6       6

Review entire Coverage Diff as of 65e146b

Powered by Codecov. Updated on successful CI builds.

Could you please update the commit message to follow our commit message conventions? This library is automatically released with semantic-release which generates our changelog based on the commit messages. Thanks!


Review newest changes to ModelManager, ModelEvents, Commands

I would like you to ask you, to review the aforementioned changes and try to adapt your codings accordingly.
We reduced the ModelManager by arround 800 LOC, without losing any functionality!
Alot of classes got obsolete and therefore deleted, e.g., several commands, mixins etc.

Sure some functionality does not work anymore, but please just fix bugs you find according to the new structure. In case of big trouble, contact me. ;-)


Integrate delete broker modal on broker details page

Integrate delete broker modal on broker details page

Closed as Completed.


PowerToys Awake Feature Inaccessible in System Tray (v0.84.1)

Microsoft PowerToys version
v0.84.1
Installation method
Microsoft Store
Running as admin
Yes
Area(s) with issue?
Awake
Steps to reproduce
After updating to PowerToys v0.84.1, the Awake feature is inaccessible via the system tray.  Occasionally, the Awake icon fails to appear in the system tray, and the feature seems to crash. However, the feature remains fully functional when accessed directly through the PowerToys settings. For earlier versions of PowerToys, the feature worked perfectly.
✔ Expected Behavior
I need to be able to access the Awake feature directly through the system tray, as it functioned in previous versions.
❌ Actual Behavior
In the latest version (v0.84.1), the Awake feature intermittently becomes inaccessible through the system tray. The icon is sometimes missing, and the feature occasionally crashes, though it remains functional when accessed via PowerToys settings.
Other Software
No response

/dup https://github.com/microsoft/PowerToys/issues/34148


landrush.pid not cleared

Landrush crashed on me once, but can't figure out how or why. But since the crash the vagrant landrush status doesn't work anymore. Even after doing a stop and start. The status will return with:
Daemon status: unknown
/Users/tim/.vagrant.d/data/landrush/run/landrush.pid exists, but process is not running
Check log file: /Users/tim/.vagrant.d/data/landrush/log/landrush.log

However it is running and does work.
LT-49:~ tim$ scutil --dns
resolver #12
  domain   : vagrant.test
  nameserver[0] : <IP_ADDRESS>
  port     : 10053
  flags    : Request A records, Request AAAA records
  reach    : Reachable, Local Address, Directly Reachable Address

LT-49:~ tim$ dig -p 10053 @localhost myhost.vagrant.test

; <<>> DiG 9.8.3-P1 <<>> -p 10053 @localhost myhost.vagrant.test
; (2 servers found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 2810
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;myhost.vagrant.test.		 I finally resolved it to change the PID id within the landrush.pid file. Maybe check on start if the PID id is used, if not, write a new one into the pid-file?
To reproduce: change the PID id within the /Users/user/.vagrant.d/data/landrush/run/landrush.pid to something else.
Versions
OS: macOS 10.12.4
Landrush: 1.2.0
Vagrant: 1.9.3

You have a runaway Landrush process. For some reason, you have a running process occupying the port Landrush port (10053). Since the registered pid is not correct, there is no way to kill the process. Also starting a new one will not work since the port is occupied. The running instance will continue to server requests though. I think this the behaviour you are seeing here.
You would need to locate the process running on port 10053 and kill it manually. On macOS something like the following would give you the needed process pid:
lsof -n -i4TCP:10053 | grep LISTEN


Exposing JWT Token expiration

I searched the documentation for a setting that allows to expose the token expiration. I implemented a response handler, but i don't know where to take the expiration date.
Something like:
def jwt_response_payload_handler(token, user=None, request=None):
    return {
        'token': token,
        'expiration':"12312312312312"
    }

Thanks

alright so this is my implementation:
import datetime
from rest_framework_jwt.settings import api_settings
def jwt_response_payload_handler(token, user=None, request=None):
    return {
        'token': token,
        'exp': datetime.datetime.utcnow() + api_settings.JWT_EXPIRATION_DELTA
    }

where is that date checked? I checked the db but found no tables where this information is stored. Sorry but I'm not finding this on the docs.

Actually, it's a part of a token. You can check jwt_decode_handler method where token is decoded by jwt library. Also that library performs multiple checks, such as checking expiry time.


Remove experimental annotation from Beam

Drop @Experimental annotations and concept from Beam. Discussion occurred at https://lists.apache.org/thread/tvvdckdom8jtv2xr9mzg0ltjjpbmydrv.
Largely automated change. There are likely mentions in comments and elsewhere that will have follow-up changes to clean up the conceptual framework.

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[x] Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
[x] Update CHANGES.md with noteworthy changes.
[x] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)

See CI.md for more information about GitHub Actions CI.

Run Java PreCommit

Run Java_Hbase_IO_Direct PreCommit

Run Java_IOs_Direct PreCommit

Run PythonLint PreCommit

Run SQL PreCommit

Run SQL_Java17 PreCommit

assign to next reviewer

I did another pass and eliminated a very large number of occurrences in comments. I also reverted a couple weird changes that did not belong, and added a note to CHANGES.md

Test failure related:
19:29:10 > Task :sdks:java:extensions:sql:zetasql:buildDependents
19:29:10
19:29:10 FAILURE: Build failed with an exception.
19:29:10
19:29:10 * What went wrong:
19:29:10 Execution failed for task ':sdks:java:extensions:sql:jdbc:analyzeClassesDependencies'.
19:29:10 > Dependency analysis found issues.
19:29:10   unusedDeclaredArtifacts
19:29:10    - beam.sdks.java:core:2.48.0-SNAPSHOT@jar

it appears that extensions-sql-setasql no longer directly depends on java core
and a couple of whitespace and spotless

Fixed Python lint manually. I guess yapf doesn't automatically fix it :-/
Removed whitespace from CHANGES.md
Ran spotlessApply
Fixed deps until analyzeClassesDependencies for SQL but having some weird stuff in the Kafka IT area:

* What went wrong:
Execution failed for task ':sdks:java:io:kafka:kafka-01103:analyzeClassesDependencies'.
> Dependency analysis found issues.
  unusedDeclaredArtifacts
   - beam.sdks.java.io:kafka:2.48.0-SNAPSHOT@jar
   - org.apache.kafka:kafka-clients:2.4.1@jar

It also seems we are generating gradle projects that do not match directories. This is going to cause a real headache in the future since it is not intended usage.

Failures, from java precommit:

org.apache.beam.runners.flink.FlinkRequiresStableInputTest.testParDoRequiresStableInputPortable
org.apache.beam.runners.flink.FlinkRequiresStableInputTest.testParDoRequiresStableInputStatefulPortable
org.apache.beam.sdk.util.UnboundedScheduledExecutorServiceTest.testThreadsAreAddedOnlyAsNeededWithContention

They all look like unrelated flakes to me.

run java precommit

Java_Spark3_Versions failed with gradle executor dying

Run SQL_Java17 PreCommit

Resolved conflicts and pushed. So all the tests need to re-run anyhow. The problem was a known timeout in the GitHub Actions workflows. We will see if we can get it green.

org.apache.beam.sdk.io.gcp.spanner.SpannerReadIT.testReadWithDataBoost

@darshan-sj saw the above failure in Spanner databoost and I noticed you authored #26007

Run Java_GCP_IO_Direct PreCommit

org.apache.beam.sdk.io.gcp.bigquery.BigQueryIOWriteTest.testTriggeredFileLoadsWithTempTablesToExistingNullSchemaTable[1]

Run Java_GCP_IO_Direct PreCommit

org.apache.beam.sdk.io.gcp.spanner.SpannerReadIT.testReadWithDataBoost

Run Java_GCP_IO_Direct PreCommit

I think we've kicked the flakes enough times here.


Using @media print css

I am currently using the service to print an image element. The problem is, I need to scale the element up when printing. I tried using @media print and then scale the element there, but it seems the query does not work with this service. Is there a workaround?

An alternative and possibly a better workaround since, printing HTML from the page is quite inconsistent:
Generate the PDF using Quest.PDF , and use this service to get the Print Dialog.


Adjust ‘Featured Jobs’ block to be consistent with

same block on  Diverse Education
DIVERSE MILITARY:

CCNEWS NOW:

 Featured Jobs block


Unable to deploy as stand alone or in PCF

When i am trying to deploy as stand alone i am getting below error.
Caused by: java.lang.ClassNotFoundException: javax.servlet.http.HttpSessionListener
at java.base/java.net.URLClassLoader$1.run(Unknown Source) ~[na:na]
at java.base/java.net.URLClassLoader$1.run(Unknown Source) ~[na:na]
at java.base/java.security.AccessController.doPrivileged(Native Method) ~[na:na]
at java.base/java.net.URLClassLoader.findClass(Unknown Source) ~[na:na]
at java.base/java.lang.ClassLoader.loadClass(Unknown Source) ~[na:na]
at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:94) ~[PivotalMySQLWeb-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
at java.base/java.lang.ClassLoader.loadClass(Unknown Source) ~[na:na]
at java.base/java.lang.Class.forName0(Native Method) ~[na:na]
at java.base/java.lang.Class.forName(Unknown Source) ~[na:na]
... 41 common frames omitted
Caused by: java.util.zip.ZipException: invalid distance too far back
at java.base/java.util.zip.InflaterInputStream.read(Unknown Source) ~[na:na]
at org.springframework.boot.loader.jar.ZipInflaterInputStream.read(ZipInflaterInputStream.java:52) ~[PivotalMySQLWeb-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
at java.base/jdk.internal.loader.Resource.getBytes(Unknown Source) ~[na:na]
at java.base/java.net.URLClassLoader.defineClass(Unknown Source) ~[na:na]
at java.base/java.net.URLClassLoader.access$100(Unknown Source) ~[na:na]
... 50 common frames omitted
and when i am trying to push in my local PCF, i am getting below error.
Staging...
warning [/tmp/app/BOOT-INF/lib/tomcat-embed-core-8.5.11.jar]:  804742 extra bytes at beginning or within zipfile
(attempting to process anyway)
warning [/tmp/app/BOOT-INF/lib/tomcat-embed-core-8.5.11.jar]:  804742 extra bytes at beginning or within zipfile
(attempting to process anyway)
-----> Java Buildpack Version: v3.13 (offline) | https://github.com/cloudfoundry/java-buildpack.git#03b493f
-----> Downloading Open Jdk JRE 1.8.0_121 from https://java-buildpack.cloudfoundry.org/openjdk/trusty/x86_64/openjdk-1.8.0_121.tar.gz (found in cache)
Expanding Open Jdk JRE to .java-buildpack/open_jdk_jre (1.3s)
-----> Downloading Open JDK Like Memory Calculator 2.0.2_RELEASE from https://java-buildpack.cloudfoundry.org/memory-calculator/trusty/x86_64/memory-calculator-2.0.2_RELEASE.tar.gz (found in cache)
Memory Settings: -Xms681574K -XX:MetaspaceSize=104857K -Xss349K -Xmx681574K -XX:MaxMetaspaceSize=104857K
-----> Downloading Container Certificate Trust Store 2.0.0_RELEASE from https://java-buildpack.cloudfoundry.org/container-certificate-trust-store/container-certificate-trust-store-2.0.0_RELEASE.jar (found in cache)
Adding certificates to .java-buildpack/container_certificate_trust_store/truststore.jks (0.9s)
-----> Downloading Spring Auto Reconfiguration 1.10.0_RELEASE from https://java-buildpack.cloudfoundry.org/auto-reconfiguration/auto-reconfiguration-1.10.0_RELEASE.jar (found in cache)
warning [/tmp/app/BOOT-INF/lib/tomcat-embed-core-8.5.11.jar]:  804742 extra bytes at beginning or within zipfile
(attempting to process anyway)

To run locally I use the following
$ mvn package
$ mvn spring-boot:run
Make sure you have JDK 1.8 in your classpath , I used this version and the maven version also shown. It should work and pushing to cloud foundry requires you yo package first and I tested this today and it works for me
pasapicella@pas-macbook:~/piv-projects/PivotalMySQLWeb$ java -version
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
pasapicella@pas-macbook:~/piv-projects/PivotalMySQLWeb$ mvn --version
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T03:41:47+11:00)
Maven home: /usr/local/Cellar/maven/3.3.9/libexec
Java version: 1.8.0_91, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.13.2", arch: "x86_64", family: "mac"

If this still doesn't work please let me know


Disabled item in checklist is being (de)selected by main (de)select control

Wave SDK Version, OS
Wave 1.5.1<PHONE_NUMBER>1324, wsl2 Ubuntu 22.04.5 LTS
Actual behavior
Even when a choice is marked as disabled, it's status gets changed by the main select/deselect control.
Expected behavior
I would expect select/deselect to ignore the disabled options
Steps To Reproduce
Managed to easily reproduce on the Hugging face tour app :)
from h2o_wave import main, app, Q, ui

@app('/demo')
async def serve(q: Q):
    if q.args.show_inputs:
        q.page['example'].items = [
            ui.text(f'selected={q.args.checklist}'),
            ui.button(name='show_form', label='Back', primary=True),
        ]
    else:
        q.page['example'] = ui.form_card(box='1 1 4 7', items=[
            ui.checklist(name='checklist', label='Choices',
                         choices=[ui.choice(name=x, label=x) for x in ['Egg', 'Bacon', 'Spam']] + [ui.choice(name="unselectable", label="unselectable", disabled=True)]),
            ui.button(name='show_inputs', label='Submit', primary=True),
        ])
    await q.page.save()

@mturoci issue for pr #2428


fix(semantic): transform checker handle conditional scopes

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#5040  👈
#5039
#5038
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @overlookmotel and the rest of your teammates on  Graphite


Define how moderating a room by stopping unwanted servers from participating

Your use case
What would you like to do?
Prevent my public room from unwanted specific servers.
Why would you like to do it?
Create specific rules for joining.
How would you like to achieve it?
API or UI
Have you considered any alternatives?
No response
Additional context
Related:
Server ACLs
https://matrix.org/docs/older/moderation/
https://spec.matrix.org/v1.8/client-server-api/#server-access-control-lists-acls-for-rooms
Public room option

This is possible via the m.room.server_acls event.
This can easily be managed by using Draupnir/Mjolnir (m.policy.rule.server/Server policy events).
This is still the de-facto way of managing server bans, and should be used in a blocklist fashion, rather than allowlist, given that many may be using their own servers to communicate.

This is possible via the m.room.server_acls event, as linked in the "related" section. This can easily be managed by using Draupnir/Mjolnir (m.policy.rule.server/Server policy events).
This is still the de-facto way of managing server bans, and should be used in a blocklist fashion, rather than allowlist, given that many may be using their own servers to communicate.

Nice, thanks!

Closing the issue since it no longer applies.


pluggable providers: kubernetes refresher removed hardcoded constants

and checked with safe_constantize to see if the provider is there

@enoodle can you have a quick look here? The idea is to make this code work, even if a specific provider is not loaded

@miq-bot add_labels providers, refactoring

@durandom LGTM :+1:

@enoodle thanks for the fast response :speedboat:

@durandom thanks for teaching me about reject :laughing:

you know, I am not sure that provider is the first thing value from the array. I think you get in provider the whole array.

@enoodle very good catch, I forgot to put some parens around it:
{a: [1,2]}.map{|a,(b,c)| pp(a,b,c)}

@Fryguy please review


Rewrite regex and add extra check to variable names

Currently the regex in the Writer class does not follow the SPSS naming rules. This should ensure that the rules are actually followed.
https://www.ibm.com/docs/en/spss-statistics/28.0.0?topic=SSLVMB_28.0.0/spss/base/syn_variables_variable_names.htm

The regex ensures that the name never ends on an underscore as that is recommended. But this does mean that the random string generator is not allowed to add _ anymore

Variable names ending in underscores should be avoided, since such names may conflict with names of variables automatically created by commands and procedures.

The function of the library is to create the sav files. The library does not define or dictate what variable names that file will have and therefore should not take actions against the names that the user decided to give it, except in the case that this names are impossible to be used.
I am also inclined towards a library that always looks for a way to generate the file, even if it has to modify the exact order that was given by the user. For example, could be something like that:
if (in_array($var->name, ['ALL', 'AND', 'BY', 'EQ', 'GE', 'GT', 'LE', 'LT', 'NE', 'NOT', 'OR', 'TO', 'WITH'])) {
    $pos = get_last_position_that_starts_with_prefix ($var->name)
    $var->name = $var->name."_".($pos);
}

However, it is not that it is wrong to throw an error in that case. Sometimes the variable names are important in the exact way the user defined it and then the user needs to know in time that this names could not be generated as he expects them. It's just that I think that in most cases, the user cares little about the names of the variables and what they are really interested in is having the data of that columns without matter about the name.

Hm yeah that might be the case. My own experience is working with survey data where the naming is very important as it comes from a survey system where the users define the names and therefor the names in the sav file needs to be an exact match.
But as I know to avoid these names, I don't see an issue with just adding a number to them. I will update the PR :+1:

It now just adds a number like requested. I also wrote some extra tests to ensure the regex works as expected.

My own experience is working with survey data where the naming is very important as it comes from a survey system

I work making health surveys for the Mexican Goverment. That's why I understand your example, but I still see it as insufficient to throw errors.
Columns names can be important in a survey, because that names are liked to a question in the questionnaire. But what is in the game here is if you want the data of the survey with some incompatibilities in the names of the variables or you prefer not to have anything. I think you will always preferred something, that nothing. That's why I think the path you've taken now is the right one.

It now just adds _$n like requested. I also wrote some extra tests to ensure the regex works as expected.

Just a fast review: What would happen if I now try to create a base with these two variable names: ('ALL', 'ALL_1')? I think you should take on account all the columns names, to dynamically detect the corresponding number instead of using a predefined list. That list have not on account what is occurring with other columns names that theoretically have not issues, but that will have conflict with the columns that you fixed his names.

Ah cool that you work in somewhat the same business as me. Our surveys are B2B :)
That is a good point. Perhaps for reserved names it would be better to make a name which is more likely to not be in use.
Something like ALL => ALL@safe (a hash could even be used to make it "safe")
Btw. It isn't allowed to have duplicate names so maybe adding a number isn't actually needed as the system already assumes you wont have duplicate names?

Btw. It isn't allowed to have duplicate names so maybe adding a number isn't actually needed as the system already assumes you wont have duplicate names?

I don't understand, what is the system? The idea here is that the library not fail in the creation of the sav. The sav database can not handled duplicate names. If we provide a duplicate name we will fail then. We need to avoid then a duplicate name, because we don't want to fail.

Something like ALL => ALL@safe (a hash could even be used to make it "safe")

The counterexample here is trying to create a database with these variable names: ('ALL', 'ALL@safe')? Like 'ALL@safe' is not a reserved name it will not be checked. Then we will convert 'ALL' in 'ALL@safe', but we already have a variable name 'ALL@safe', so we create a duplicate name and this will then fail, but we don´t  want it to fail.

Allowing the library user to create a database with a duplicate column name would be, I think, being too flexible, because a column name duplicated by the user sounds more like a user error that should be fixed than a limitation of the library. Not being able to write reserved words is a limitation of the library and therefore it is something with which we could be somewhat flexible. The user does not have to know about library limitations in advance. The one who is creating the questionnaire will not take on accound the mimitation of the this library, but he has to take into account, not giving the same names to different things.

One could argue the limitation is in spss, not this library. If we just allowed those names, I assume it would be spss that would throw an exception or error
Anyways. If the only requirement is that it's unique, I would think this should work in most cases. It could be checked against existing names if needed
if (in_array($var->name, ['ALL', 'AND', 'BY', 'EQ', 'GE', 'GT', 'LE', 'LT', 'NE', 'NOT', 'OR', 'TO', 'WITH'])) {
    $var->name = uniqid($var->name);
}

Yes is a limitation of spss, and the library create the spss, so, it is also by implication a limitation of the library and how the user use the library a limitation that is imposed to the user. In the other case is a user doing something wrong.


Delegate active wif

I 've updated the page "Authorize" to allow active wif delegation. There is also a parameter redirect_uri for setup a callback url. The link is build like this:
/authorize/@steemit/active?redirect_uri=https://steemit.com/

Here a link for try this PR https://sc2-dev-pr-25.herokuapp.com/authorize/@steemit/active?redirect_uri=https://steemit.com/