Kinarm | Interactive Robotics Brain Injury Research

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

Mobile nav

Is it possible to make the auto move with a certain speed

Is it possible to make the auto move with a certain speed

Posted on Jul 24, 2017

DWQA Questions › Category: Custom Task Development › Is it possible to make the auto move with a certain speed
0 Vote Up Vote Down
Michael Huang asked 6 years ago

Hi, I am doing a task that requires a comfortable speed when the robot move the limb. From my knowledge, I can set up the duration time to control the speed. Is there a way to control the speed directly?

2 Answers
0 Vote Up Vote Down
Ian Brown Staff answered 6 years ago

Dear Michael,

The short answer is “yes, it is possible to control the speed directly”.

There are many ways to do what you asked, so I will provide one method in the context of the position control examples that we provide on our Sample Custom Tasks download section . In the position control examples that we provide, position controllers are used to directly control the movement of the robot. The movement is specified by a trajectory, which is a series of positions over a given duration. These examples create trajectories that have a bell-shaped velocity profile which is specified by a duration and distance (i.e. there is an implicit velocity). However, that trajectory could also be specified by a peak-velocity and distance, for example.
The following code defines the trajectory in the position controller sample:
• trajectory_shape = tick/duration-sin(2*pi*tick/duration)/(2*pi);
• virt_pos[1] = start_pos[1] + (final_pos[1] – start_pos[1]) * trajectory_shape;
Differentiating the virt_pos gives:
• Velocity = (final_pos[1] – start_pos[1]) / duration * (1 – cos(2*pi*tick/duration) )
The peak velocity will occur when tick/duration = 0.5
• Peak_Velocity = (final_pos[1] – start_pos[1]) / duration * 2
Re-arranging gives:
• duration = 2 * (final_pos[1] – start_pos[1]) / Peak_Velocity
Therefore, you could use the position controller sample code as in the examples, specify a desired peak velocity (e.g. in your Task Protocol) and then calculate the duration associated with that Peak_Velocity and feed that into the code.

Michael Huang replied 5 years ago

Hi,
Once I replace duration=input_duration with duration =2*(final_pos[1]-start_pos[1])/Peak_Velocity. It does not move the handle correctly, it moves so fast and trying to move out of the screen. Cannot figure out why?

Thanks,
Jinyang

Koloman Varady Staff replied 5 years ago

Hi,

The time units in that Stateflow block are milliseconds. So the duration is milliseconds and the Peak_Velocity is metres / millisecond as well. That may account for your high velocity.

Let me know if that solves your problem!

Cheers,

Koloman

Michael Huang replied 5 years ago

Hi,
I converted the speed by peakSpeed=desiredSpeed/1000 or peakSpeed=desiredSpeed/100000; Then the handle doesn’t move at all.

Thanks,
Jinyang

0 Vote Up Vote Down
Koloman Varady Staff answered 5 years ago

Hi,

The best way to diagnose what the model is doing is to use the xpc scopes (scopes are described in Section 7.5 of our Custom Task Programming user for 3.6). I would put a scope on each

of the desired position inputs (x and y) to double check that the inputs are correct. I also would recommending using the KINdata_bus From tag and use scopes to read some of the values

there to see what the model is doing. In a typical setup, where the robot computer and Dexterit-E computer share a keyboard, video and mouse, the KVM switch will need to be used to

switch the monitor to view the robot computer (e.g. double tap to switch which computer is viewed on the monitor). On the robot computer screen you will see what your

scopes are outputting.

When you connect the KINdata_bus From tag to a Bus Selector component and double click the Bus Selector, you will be able to choose from a host of data that you will be able to read on a

scope. This includes the x and y velocities, the commanded forces, as well as the x and y acceleration. You can check that against your math and see if what’s happening is what you

expected to happen.

Cheers,
Koloman

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.