Jump to content

Recommended Posts

Posted

VIVE XR Elite System Software (FOTA 7.3) 1.0.999.702
Released September 4, 2024

 What's new

  • Added support for 4- to 8-digit passcodes in Kiosk mode.
  • Added an option for GMT+3:30 (Tehran) in the time zone settings.

 Fixed issues

  • Fixed an issue with DRM-protected content.
  • Fixed an issue where the headset would automatically power on when connected to an external power source via the extended USB Type-C port.
  • 2 weeks later...
Posted

I have odd behaviour since this update in xrLocateHandJointsEXT:

When controller is active since start of application, xrLocateHandJointsEXT returns isActive=true, locationFlags has XR_SPACE_LOCATION_POSITION_VALID_BIT but values appear to not be initialized.

 

Repro code:

std::optional<std::array<xr::hand_tracker::joint, XR_HAND_JOINT_COUNT_EXT>> xr::hand_tracker::locate(XrSpace space, XrTime time)
{
	if (!id || !xrLocateHandJointsEXT)
		return std::nullopt;

	XrHandJointsLocateInfoEXT info{
	        .type = XR_TYPE_HAND_JOINTS_LOCATE_INFO_EXT,
	        .next = nullptr,
	        .baseSpace = space,
	        .time = time,
	};

	std::array<XrHandJointLocationEXT, XR_HAND_JOINT_COUNT_EXT> joints_pos;
	std::array<XrHandJointVelocityEXT, XR_HAND_JOINT_COUNT_EXT> joints_vel;

	XrHandJointVelocitiesEXT velocities{
	        .type = XR_TYPE_HAND_JOINT_VELOCITIES_EXT,
	        .next = nullptr,
	        .jointCount = joints_vel.size(),
	        .jointVelocities = joints_vel.data(),
	};

	XrHandJointLocationsEXT locations{
	        .type = XR_TYPE_HAND_JOINT_LOCATIONS_EXT,
	        .next = &velocities,
	        .jointCount = joints_pos.size(),
	        .jointLocations = joints_pos.data(),
	};

	CHECK_XR(xrLocateHandJointsEXT(id, &info, &locations));

	if (!locations.isActive)
		return std::nullopt;

	std::array<xr::hand_tracker::joint, XR_HAND_JOINT_COUNT_EXT> joints;
	for (int i = 0; i < XR_HAND_JOINT_COUNT_EXT; i++)
	{
		joints[i] = {joints_pos[i], joints_vel[i]};

		if (not (joints_pos[i].locationFlags & XR_SPACE_LOCATION_POSITION_VALID_BIT))
			spdlog::warn("isActive but joints_pos[{}] position invalid", i);
		else
		{
			if (std::isnan(joints_pos[i].pose.position.x))
				spdlog::warn("joints_pos[{}].x is nan", i);
			if (std::isnan(joints_pos[i].pose.position.y))
				spdlog::warn("joints_pos[{}].y is nan", i);
			if (std::isnan(joints_pos[i].pose.position.z))
				spdlog::warn("joints_pos[{}].z is nan", i);
		}
		if (not (joints_pos[i].locationFlags & XR_SPACE_LOCATION_ORIENTATION_VALID_BIT))
			spdlog::warn("isActive but joints_pos[{}] orientation invalid", i);
		else
		{
			if (std::isnan(joints_pos[i].pose.orientation.x))
				spdlog::warn("joints_pos[{}].orientation.x is nan", i);
			if (std::isnan(joints_pos[i].pose.orientation.z))
				spdlog::warn("joints_pos[{}].orientation.z is nan", i);
			if (std::isnan(joints_pos[i].pose.orientation.y))
				spdlog::warn("joints_pos[{}].orientation.y is nan", i);
			if (std::isnan(joints_pos[i].pose.orientation.w))
				spdlog::warn("joints_pos[{}].orientation.w is nan", i);
		}
	}

	return joints;
}

Sample output:

Quote

                         W  [2024-09-18 18:08:17.196] [WiVRn] [warning] joints_pos[10].orientation.w is nan
                         W  [2024-09-18 18:08:17.196] [WiVRn] [warning] joints_pos[10].orientation.w is nan
                         W  [2024-09-18 18:08:18.377] [WiVRn] [warning] joints_pos[24].x is nan
                         W  [2024-09-18 18:08:18.377] [WiVRn] [warning] joints_pos[24].x is nan
                         W  [2024-09-18 18:08:18.410] [WiVRn] [warning] joints_pos[21].z is nan
                         W  [2024-09-18 18:08:18.410] [WiVRn] [warning] joints_pos[21].z is nan
                         W  [2024-09-18 18:08:18.411] [WiVRn] [warning] joints_pos[21].z is nan
                         W  [2024-09-18 18:08:18.411] [WiVRn] [warning] joints_pos[21].z is nan
 

 

  • 4 weeks later...
Posted
On 9/19/2024 at 12:09 AM, Xytovl said:

When controller is active since start of application, xrLocateHandJointsEXT returns isActive=true

Hi @Xytovl,

There is an issue in 1.0.999.702 which did not provide correct value for isActive.

Could you try changing VALID_BIT to TRACKED_BIT instead?

By the way, we suggest to check TRACKED_BIT instead of VALID_BIT, it is because when both value of VALID_BIT is true, it means handtracking is 6DoF.

As for the nan value, it is initial value from runtime.

If handtracking started and lost tracking, value should keep last tracking position.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...