# Link movement with respect to motion sensor data

1 view (last 30 days)
Ajay Raj K on 14 Dec 2021
Answered: Karsh Tharyani on 24 Mar 2023
I am trying to simulate a chain of links links from the motion sensor data that is generated realtime. The generated data is in the format of Euler angles. I would like to visualise the link motion in matlab using the relevant toolbox (I assume robotic toolbox helps). But I am not sure where to knock. If someone can guide me how to approach the problem, or rather, where to look for similar problems, it would be very helpful. Thanks in advance.
##### 2 CommentsShow 1 older commentHide 1 older comment
Ajay Raj K on 20 Dec 2021
Thanks for the response Mr. Sandip Kumar.
This is something that looks like a chain of links that i mentioned about ( This is not exactly the problem statement, but is a downloaded image, but this works for the situation and explaination). I have the orientation data from motion sensors mounted on the joints in terms of euler angles ( I can deduce the rotation atrix etc. from that also). The euler angle data looks like the following snip (This is sample data for one joint. Similaly multiple sensors will be there for multiple joints, basically forming the chain ol links)
The links (or rather the sensor orientations) would be caliberated to an initial reference position ( which I have accomplished by mechanical calculations based on rotation matrix). So, further from the data, I need to visualise the joint movement based on the sensor data ( Note that link lengths are fixed and hence the orientation data well defines the joint positions).
This is how a rotation matrix would look like, for one sensor, and then 'n' number of sensors.
Also, I have deduced the link orientations with a local coordinate system in terms of angles, if it would help. Kindly ask for any further clarifications if this already doesn't explain.
Thankyou.

Karsh Tharyani on 24 Mar 2023
Hi Ajay,
You can model the leg as a rigidBodyTree. Given this is a serial linkage, with a configuration vector representing the joint position angles, you can simply call the show function on the rigidBodyTree to visualize the positions of the linkages.
Here are is a reference page in our Documentation which should help you get started:
I hope this helps.
Best,
Karsh

### Categories

Find more on Robotics in Help Center and File Exchange

R2021b

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!