Robotis Openmanipulatorx icon Robotis Openmanipulatorx Inverse kinematics for Robotis OpenManipulatorX: compute joint angles and MoveTo 3D (cm) positions, supports camera-to-CM mapping for pick-and-place. Try it →
South Africa
Asked

Omron HVC-P Vars Not Updating On Shell-E

Working on a Shell-e build with an IoTiny over WiFi and trying to use the Omron HVC-P skill to do simple face tracking for a pan/tilt head (servos on D0/D1). The HVC-P is connected to my Windows laptop via an Adafruit FTDI Friend (GND->GND, VCC->5V, RX<-TX, TX->RX). In the Omron HVC-P skill I can connect on COM5 at 921600 (also tried 115200). I installed Python and PySerial per the plugin instructions. The skill reports connected and seems happy, but I’m not seeing any variables in Variable Watcher after calling detect.

I’m triggering detection from a Script control like this (EZScript):

ControlCommand("Omron HVC-P", "Omron_Detect_All")
Sleep(200)
# Expecting variables to appear here? e.g.
# $Omron_Face_X, $Omron_Face_Y, $Omron_Face_Exists
# Then map to servos, roughly centering:
# Servo(D0, 90 - (($Omron_Face_X - 50) * 0.8))
# Servo(D1, 90 + (($Omron_Face_Y - 50) * 0.8))

I also tried the options call:

ControlCommand("Omron HVC-P", "Omron_Detect_Options", "[bhfgsaoxe]")

Then looping Detect_All every 300-500 ms. Still no variables show up. I’ve searched the project variables for anything containing "Omron", "HVC", "Face", etc. Nothing is being created. If the variables are case-sensitive or named differently, I might be guessing wrong. I also tried slowing the loop, changing baud, and verifying the FTDI Friend is in 5V VCC mode with a common ground.

Before I chase wiring further, can someone share the exact ARC variable names the Omron HVC-P skill sets for face detection (exists, x, y, size, etc.) and a minimal working example of reading them and driving two IoTiny servos without overrunning the serial link?



Related Hardware (view all EZB hardware)
Shell-E by EZ-Robot
Build and customize robot pets with 3D printing using the Shell-E Kit and EZ-B IoTiny-teach STEAM, vision tracking, speech recognition, ML and VR
Wi-Fi
Servos 8
Camera
Audio
UART
I2C
ADC 2
Digital 8

Related Robot Skills (view all robot skills)
Script by Synthiam
Multi-language ARC Script: build, run and debug Blockly, JavaScript, EZ-Script or Python with Intellisense, run/save/load and Roboscratch support
Windows ARC plugin for Omron HVC-P/HVC-P2: Python-based face/body/hand detection, gaze, age/gender, expressions and recognition; dual-camera support.

ARC Pro

Upgrade to ARC Pro

Synthiam ARC Pro is a new tool that will help unleash your creativity with programming robots in just seconds!

Author Avatar
PRO
Canada
Twitter YouTube GitHub
#1  

Yes - for the Omron HVC-P / HVC-P2 plugin, the variable names are not the ones you guessed in your sample, and they’re also case-sensitive.

For face detection on the original Omron HVC-P skill, the common ARC variables are:

  • $Omron_face_Count
  • $Omron_face_CoordX
  • $Omron_face_CoordY
  • $Omron_face_Reliability
  • $Omron_face_inclination_angle
  • $Omron_face_leftright_direction
  • $Omron_face_verticle_angle

And for a face-specific result:

  • $Omron_age
  • $Omron_gender
  • $Omron_expression
  • $Omron_gaze_LeftRight
  • $Omron_gaze_UpDown
  • $Omron_Recognized_Name
  • $Omron_recognition_score

So for a basic "face exists" check, use:

  • Face exists: $Omron_face_Count > 0
  • Face X: $Omron_face_CoordX
  • Face Y: $Omron_face_CoordY

Important note about the plugin behavior

The HVC-P plugin does not create variables named like:

  • $Omron_Face_X
  • $Omron_Face_Y
  • $Omron_Face_Exists

Those names are why you’re not seeing anything in Variable Watcher.

Minimal working example

Also, since you’re using Shell-e + IoTiny, I’d strongly recommend using JavaScript in the Script skill instead of EZ-Script. ARC’s JavaScript is better for this kind of control loop.

Here’s a simple example that:

  1. Triggers Omron detection
  2. Waits a short moment
  3. Reads the face variables
  4. Moves two servos on d0 and d1
var faceCount = getVar("$Omron_face_Count", 0);

if (faceCount > 0) {
  var faceX = getVar("$Omron_face_CoordX", 50);
  var faceY = getVar("$Omron_face_CoordY", 50);

  // Map from 0-100 face coordinates to servo corrections
  var pan = 90 - ((faceX - 50) * 0.8);
  var tilt = 90 + ((faceY - 50) * 0.8);

  if (pan < 1) pan = 1;
  if (pan > 180) pan = 180;
  if (tilt < 1) tilt = 1;
  if (tilt > 180) tilt = 180;

  Servo.setPosition(d0, pan);
  Servo.setPosition(d1, tilt);

  print("Face detected: X=" + faceX + ", Y=" + faceY);
} else {
  print("No face detected");
}

If you want to trigger detection first

If the plugin expects a command before the variables update, do this:

controlCommand("Omron HVC-P", "Omron_Detect_All");
sleep(200);

var faceCount = getVar("$Omron_face_Count", 0);
var faceX = getVar("$Omron_face_CoordX", 50);
var faceY = getVar("$Omron_face_CoordY", 50);

print("Count=" + faceCount + " X=" + faceX + " Y=" + faceY);

A couple of likely issues in your setup

1) Wrong variable names

This is the biggest one. Use the exact names above.

2) Not enough time after Omron_Detect_All

Sleep(200) may be too short depending on the camera response time. Try 300-500 ms.

The plugin can show "connected" even if the detection cycle isn’t producing results yet.

4) Don’t poll too fast

Calling detect every 300-500 ms is reasonable. Faster can overwhelm the camera/plugin and make results unreliable.

Try this as a starting point:

while (true) {
  controlCommand("Omron HVC-P", "Omron_Detect_All");
  sleep(400);

  var faceCount = getVar("$Omron_face_Count", 0);
  var faceX = getVar("$Omron_face_CoordX", 50);
  var faceY = getVar("$Omron_face_CoordY", 50);

  if (faceCount > 0) {
    var pan = 90 - ((faceX - 50) * 0.8);
    var tilt = 90 + ((faceY - 50) * 0.8);

    Servo.setPosition(d0, pan);
    Servo.setPosition(d1, tilt);
  }

  sleep(100);
}

One thing I’d verify in the HVC-P skill

Open the skill’s kebab menu / configure menu and confirm:

  • the port is correct
  • baud is set correctly
  • the Python folder is set
  • the album folder is set if you’re using recognition
  • the skill is actually configured for the detection modes you want

Useful reference

The Omron second-camera plugin notes and variable list are here:

And the Script robot skill docs:

If you want, I can help you rewrite your current routine into a clean ARC JavaScript face-tracking script for the Shell-e that runs on the IoTiny and avoids overrunning the camera.


I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.