Australia
Asked

Kinect 360 Body Control Skill

How do I pause and unpause the Kinect Body Control skill within a program? There doesn't seem to be a ControlCommand to do this. Without this ability, I have to walk up to my robot and physically press the pause check box. The robot reacts to my movement as I approach - not ideal.


Related Hardware EZ-B v4
Related Control Kinect Body Control

ARC Pro

Upgrade to ARC Pro

Join the ARC Pro community and gain access to a wealth of resources and support, ensuring your robot's success.

PRO
Canada
#1  

To programmatically pause and unpause the Kinect Body Control skill within your ARC project, you can utilize the ControlCommand() function in scripting, even though there might not be a direct command listed for pausing/unpausing in the skill's documentation.

The ControlCommand() function is versatile and allows you to interact with most robot skills by sending specific commands. For skills that don't explicitly list a pause/unpause command, you can often achieve this functionality by enabling or disabling the skill itself.

Here's a general approach to toggling the pause state of the Kinect Body Control skill using EZ-Script:

  1. To Pause the Kinect Body Control Skill:

    ControlCommand("Kinect Body Control", "Disable")
    
  2. To Unpause (Enable) the Kinect Body Control Skill:

    ControlCommand("Kinect Body Control", "Enable")
    

Please replace "Kinect Body Control" with the exact name of the Kinect Body Control skill instance in your project if you've renamed it. The skill instance name can be found in the title bar of the skill window in ARC.

Note: The commands "Disable" and "Enable" are common ControlCommand parameters for controlling the active state of a skill. However, if these commands do not achieve the desired effect for the Kinect Body Control skill specifically, it may be necessary to look for alternative methods or reach out to the Synthiam community for further assistance.

Since direct pause/unpause functionality via ControlCommand() might not be available for all skills, including Kinect Body Control, another approach could involve setting up custom flags or variables in your script to manage when the Kinect data should be processed or ignored, effectively simulating a pause/unpause behavior.

If you find that the standard methods do not work as expected for the Kinect Body Control skill, I recommend checking the Synthiam community forums or support resources for any skill-specific advice or updates that might provide a more direct solution.


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.
PRO
Australia
#2  

Those suggested solutions would be fine if they existed. I think a ControlCommand needs to be added to this skill so it can be paused within a program.

PRO
Australia
#3  

I see this is done in the new release of the Kinect 360 Body Control skill. Thanks a million. I will implement straightaway.

PRO
Australia
#4   — Edited

This has highlighted a new problem. When I pause the Kinect Body Control, it is still running, though obviously not moving the servos. And because it is still running, my XBox controller doesn't work properly. I assume this is because they are both running. Is it possible to have the ControlCommand for the Kinect Body Control skill that Disables and Enables it? (ControlCommand("Kinect Body Control", "Disable"), as Athena suggested, and would this stop it running? One observation worth noting, if I put tape over the Kinect 360 camera, the XBox Controller works properly, indicating that Disabling the Kinect 360 would achieve the desired result.

PRO
Synthiam
#5  

Can you elaborate on what you mean by "my XBox controller doesn't work properly". This robot skill has no connection to a joystick, as it's designed for the Microsoft Kinect 360.

PRO
Australia
#6  

I have an XBox Controller and Kinect 360 connected to my robot. The XBox Controller doesn't work when the Kinect 360 is operating - the robot doesn't respond to buttons pressed or joystick movement. If the lens is covered, then there's no problem. So I need to disable the Kinect 360 skill, not just pause it as pausing doesn't stop it operating. At the moment I cover the lens on the Kinect 360 to stop it operating - hardly an ideal solution.

User-inserted image

PRO
Belgium
#7  

afcorson

cool robot . did you design the parts ?

PRO
Australia
#8  

The 3D printed parts are adaptations from the Poppy open source robot.

#9  

That's interesting. I didn't know that Mecanno had a Karel robot. I have the non G15 1.0 Meccanoid robot. I might replace its servos and board with four servos and an IO-Tiny. I have an extra one laying around.

PRO
Synthiam
#10  

There is no way to "stop" the Kinect without unplugging it. When power is applied, it sends the data. So, there must be something else going on. I can't understand how the joystick and Kinect are related. Is your Xbox joystick connected to the Kinect? I wonder if the USB hub is saturated with the joystick and Kinect on the same hub. Before you say you don't have an external hub, the computer has a hub. A computer may have 23853258235823582358235823852385832 USB ports, but there are 2883258235823853823823582385328235 hubs inside. Usually, there are 2-3 hubs on a computer's motherboard. So, my first suggestion would be to try changing the USB ports for the joystick. See if using it on a different internal hub helps. The Kinect is VERY bandwidth-intensive. It will saturate a USB channel quickly.

PRO
Belgium
#11  

hi winterU

you can use the MG995 servo's . they are very cheap . they are same size

freedom 1-5 to 175-180

https://www.banggood.com/nl/4PCS-Racerstar-MG995-13KG-Metal-Gear-Large-Torque-Analog-Servo-For-1-8-1-10-RC-Car-Robot-Helicopter-Airplane-p-1512854.html?cur_warehouse=CN

PRO
Australia
#12  

My XBox Controller is connected to the computer via Bluetooth. The USB hub has the EZB, Kinect 360 and camera connected. But it seems like the robot cannot handle the Kinect 360 data and XBox controller data at the same time. If the Kinect 360 wasn't paused, the two devices would be trying to move the same servos. Covering the Kinect 360 lens is the only solution I can think of.

PRO
Synthiam
#13  

Hmmm, that's very strange. When the kinect is paused, it doesn't move the servos at all - which is what pause does. I wonder if it's the framerate causing the CPU consumption too high and the joystick events are missed in the API.

I made a small change to v11 of the robot skill. Update to that and see if it makes a differene.

PRO
Australia
#15  

I updated the Kinect 360 Skill and tried using the XBox Controller with the Kinect 360 active. I can't say I noticed any difference. I have made a hinged lens cover for the Kinect 360. So it is easy to just cover the lens, pause the Kinect 360, then use the XBox Controller without a problem. Thanks for your efforts though.

PRO
Synthiam
#16  

i still think we should figure this out. It doesn't make sense to me that the xbox controller stops working when the kinect is running. and not even running, I mean detecting a person. let me think if there's another thing I can try. stay tuned hmmm

PRO
Australia
#17  

Just to clarify, when the Kinect 360 displays a green figure (paused and unpaused), the XBox controller doesn't operate properly. Put a lens cover over the Kinect 360 so there is no green figure displayed, the XBox controller works normally.

PRO
Synthiam
#18  

Okay - thanks for the clarification - it's what I figured by having the cover on the lense. It still baffles me though haha

PRO
USA
#19  

My Kinect xbox 360 was not working - I went to "settings" on my laptop, Bluetooth  and devices remove the Kinect and reconnected it then it worked.

PRO
Australia
#20  

My Kinect 360 is connected via USB. I didn't see any reference to it in Bluetooth settings. I did see Kinect USB audio device listed, so I removed that. I'll test it again later.