Home Questions Creating a rectantgular virtual wall

Creating a rectantgular virtual wall

DWQA QuestionsCategory: QuestionsCreating a rectantgular virtual wall
Arash Salemi asked 2 years ago
Hello, I hope you're doing well. I am seeking guidance on how to create a rectangular virtual wall in Kinarm EP. Specifically, I want to constrain the robot's workspace to a predefined rectangular area. My goal is to ensure that when a participant moves their hand beyond this boundary, they experience a resistance force that prevents them from moving further outside the rectangle. I believe this could be achieved using the KINARM_EP_Apply_Loads block without relying on the Position Control block, but instead using only a MATLAB function. So I assume I have to have a MATLAB function and connect its output to the KINARM_EP_Apply_Loads block. If this approach is feasible, could you clarify the required output format of the MATLAB function? I assume it should match the output format of the KINARM_EP_Position_Controller block. Is the output of the MATLAB function, for example, the force in N with x and y directions? (e.g. [1N, 3N]) I appreciate your time and assistance.
1 Answers
Koloman Varady Staff answered 2 years ago
A force wall is essentially a spring – as you move into the wall, there is a spring force pushing you back to the boundary. You can indeed program it inside a MATLAB function. You have to calculate the distance to the wall and use an appropriate value of k. The value of k is going to depend on which Kinarm you have and its components. There are example k values (termed wall stiffness) in the force channel sample tasks that you can use. The KINARM_EP_Apply_Loads (and its Kinarm exoskeleton equivalent block Kinarm_Exo_Apply_Loads) is the block that writes your force values to the motors. As described in its helpfile, KINARM_EP_Apply_Loads takes as input a 1x4 vector whose values are [Fx_right_arm, Fy_right_arm, Fx_left_arm, Fy_left_arm]. Kinarm_Exo_Apply_Loads has a different format, it takes as input a 1x4 vector whose values are [Torque_shoulder_right_arm, Torque_elbow_right_arm, Torque_shoulder_left_arm, Torque_elbow_left_arm]