Kinarm | Interactive Robotics Brain Injury Research

  • Products
  • Clinical Applications
  • News
  • Support
  • About Us
  • Contact

Mobile nav

Using velocity for state transition

Using velocity for state transition

Posted on Dec 7, 2018

DWQA Questions › Category: Custom Task Development › Using velocity for state transition
0 Vote Up Vote Down
Xin Li asked 4 years ago

I’m trying to have the target jump when hand velocity exceeds a certain threshold. I used the BusSelector to pull out a1_hand_velocities from KINdata_bus and used it as input for the Stateflow chart. I have something like a1_hand_velocities(1,1)^2+a1_hand_velocities(1,2)^2 > 1.0 as a condition for transition between two states. However, when compiling, the error said something to the effects that the variable a1_hand_velocities was not defined. What is the correct way to use data from KINdata_bus? Can it be used for state transition?

2 Answers
0 Vote Up Vote Down
Koloman Varady Staff answered 4 years ago

Hi Xin Li,
You’re getting the velocities correctly. You connect the Kindata_bus From tag to a bus selector and double-click the signal you want.

In Stateflow, you should then make an input (I called it hand_velocities) in this case. You would use the variable as hand_velocities. Make sure to go to the Description tab of hand_velocities in Model Explorer and set First Index to 1. You would then access the x-position of the hand using hand_velocities[1] and y-position as hand_velocities[2].

Xin Li replied 4 years ago

Thanks! It takes the velocity inputs now. However, I’m still having trouble having it use the velocity as a transitioning statement. Currently, I have between two states: [sqrt(right_hand_velocities[1]^2+right_hand_velocities[2]^2)>Trial_Protocol[MOVEMENT_ONSET]].
When I set MOVEMENT_ONSET to >=1.8, no matter how fast I move the robot arm, it does not transition between the states. When the value is <= 1.7, the state transition seem to happen without me moving the robot arm. I think part of the problem is that I do not know the unit of the velocity inputs, and I couldn't find it in the manual. More generally, how do we find the units of KINARM outputs?

0 Vote Up Vote Down
Duncan McLean Staff answered 4 years ago

Hello Xin Li,

With only one exception, we always use SI units. The exception is that target positions are handled in centimeters since that is an easier unit of measure to deal with.

So in this case the hand velocities are in m/s.

If you look in the Task Programming Guide for Dexterit-E 3.7 section 10.1 details the data in KINdata and KINdata_bus. In this case the KINdata table has values HVX and HVY – which are Hand Velocity X and Y. In the next version of the guide we’ll be switching everything over to the KINdata_bus so that the the table is easier to read and understand.

Could you please send your model to support@bkintechnologies.com? We can take a look at the model and see if we can determine what is happening.

All the best,
Duncan

Support

  • User Guides & Documentation
  • Software Downloads
  • Install/Maintain Your KINARM Lab
  • Training Videos
  • New User Training
  • Creating Custom Tasks
  • Sample Custom Tasks
  • Q&A Forum
  • Publications by Research Area

Products

  • Platform Comparison
  • Kinarm Exoskeleton Lab
  • Kinarm End-Point Lab
  • Kinarm Standard Tests
  • Dexterit-E
  • Dexterit-E Explorer
  • NHP Kinarm Exoskeleton Lab

Clinical Applications

  • Clinical Applications
    • Stroke and TIA
    • Traumatic Brain Injury (TBI)
    • Neurological Disease
    • Pediatric
    • Primarily Non-Neurological
  • Clinical Research Sites
  • Publications

News

  • Kinarm News
  • Events
    • Neuroscience
    • Kinarm Camp
  • Product Notices
  • @KinarmLab Twitter Feed
  • Open Jobs

Support

  • Kinarm Help & Support
  • User Guides & Documentation
  • Software Downloads
  • Installing & Maintaining Your Kinarm Lab
  • Training Videos
  • New User Training
  • Creating Custom Tasks
  • Sample Custom Tasks
  • Q&A Forum

About Us

  • About Us
  • Our People
  • Quality
  • Supplier Requirements
  • End-User License Agreement
  • Intellectual Property
  • Privacy & Terms

Contact

  • Contact Kinarm
    • International Sales Agents
  • Request an Account
footer-logo

140 Railway St. Kingston, ON K7K 2L9 Canada Toll Free: (888) 533-4393 Phone: (613) 507-4393 info@kinarm.com

© Copyright BKIN Technologies. All Rights Reserved

Quality | Privacy Policy | Web design/development by 1dea Design + Media Inc.