Haptic Controller
Loading...
Searching...
No Matches
mapping.hpp
Go to the documentation of this file.
1#pragma once
2#include <vector>
3
7std::vector<float> rt_to_ht(std::vector<float> joint_angles)
8{
9 const auto yaw = joint_angles.at(0);
10 const auto curl = joint_angles.at(1) + joint_angles.at(2);
11 return {yaw, curl};
12}
13
17std::vector<float> ht_to_rt(std::vector<float> joint_angles)
18{
19 const auto yaw = joint_angles.at(0);
20 const auto curl1 = joint_angles.at(1) / 2;
21 const auto curl2 = joint_angles.at(1) / 2;
22 return {yaw, curl1, curl2};
23}
std::vector< float > ht_to_rt(std::vector< float > joint_angles)
Converts the joint angles from the haptic to robot space.
Definition mapping.hpp:17
std::vector< float > rt_to_ht(std::vector< float > joint_angles)
Converts the joint angles from the robot to haptic space.
Definition mapping.hpp:7