Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
b91e4e4
Delete SRS/practice_1/practice_1.ipynb
RakshinEgor Nov 1, 2025
32a5944
Create Task_1.md
RakshinEgor Nov 1, 2025
6a64d8b
Update Task_1.md
RakshinEgor Nov 1, 2025
7bfcb90
Add files via upload
RakshinEgor Nov 1, 2025
e39e282
Update Task_1.md
RakshinEgor Nov 1, 2025
1fb2576
Update Task_1.md
RakshinEgor Nov 1, 2025
401f740
Update Task_1.md
RakshinEgor Nov 1, 2025
fe38ded
Update Task_1.md
RakshinEgor Nov 1, 2025
342478f
Update Task_1.md
RakshinEgor Nov 1, 2025
3837db0
Update Task_1.md
RakshinEgor Nov 1, 2025
16319fc
Update Task_1.md
RakshinEgor Nov 1, 2025
e9663b0
Update Task_1.md
RakshinEgor Nov 1, 2025
823b9c5
Update Task_1.md
RakshinEgor Nov 1, 2025
e8cda95
Create Task_2.md
RakshinEgor Nov 1, 2025
b215248
Update Task_2.md
RakshinEgor Nov 1, 2025
7ebd8ac
Update Task_2.md
RakshinEgor Nov 1, 2025
3637747
Update Task_2.md
RakshinEgor Nov 1, 2025
f1e6034
Update Task_2.md
RakshinEgor Nov 1, 2025
a9a5ca3
Update Task_2.md
RakshinEgor Nov 1, 2025
6b13c77
Update Task_2.md
RakshinEgor Nov 1, 2025
d759132
Update Task_1.md
RakshinEgor Nov 1, 2025
19ada36
Update Task_2.md
RakshinEgor Nov 1, 2025
5cd24b3
Update Task_2.md
RakshinEgor Nov 1, 2025
3508024
Update Task_1.md
RakshinEgor Nov 1, 2025
16515c6
Create readme.md
RakshinEgor Nov 2, 2025
1ef25e4
Update readme.md
RakshinEgor Nov 2, 2025
90c4c3c
Create report.md
EgorRakshinTest Nov 2, 2025
7d069c1
Add files via upload
EgorRakshinTest Nov 2, 2025
331e33f
Merge pull request #1 from EgorRakshinTest/main
RakshinEgor Nov 2, 2025
fea82ff
Delete SRS/practice_1/submissions/373529_EgorRakshin_Task1 directory
RakshinEgor Nov 2, 2025
ae324ed
Create report.md
EgorRakshinTest Nov 2, 2025
4452b23
Add files via upload
EgorRakshinTest Nov 2, 2025
5cde928
Merge pull request #2 from EgorRakshinTest/main
RakshinEgor Nov 2, 2025
a87cecd
Delete SRS/practice_1/submissions/373529_RakshinEgor_Task1 directory
RakshinEgor Nov 2, 2025
665e3b3
Create report.md
RakshinEgor Nov 3, 2025
1d2a77b
Create readme.md
RakshinEgor Nov 3, 2025
26619ae
Delete SRS/practice_2/submissions/report.md
RakshinEgor Nov 3, 2025
a5bd15b
Update readme.md
RakshinEgor Nov 3, 2025
dd43a38
Create report.md
RakshinEgor Nov 3, 2025
10cc2a2
Create report.md
RakshinEgor Nov 3, 2025
e781469
Delete SRS/practice_2/submissions/373529_RakshinEgor_Task1 directory
RakshinEgor Nov 3, 2025
3bcab18
Create report.md
RakshinEgor Nov 3, 2025
9394465
Create report.md
naghamsleman Nov 3, 2025
c488411
Add files via upload
naghamsleman Nov 6, 2025
4b03acb
Create readme.md
naghamsleman Nov 10, 2025
d7c264e
Add files via upload
naghamsleman Nov 10, 2025
8e01760
Add files via upload
naghamsleman Nov 10, 2025
27b9174
Add files via upload
naghamsleman Nov 10, 2025
fb151c4
Create readme.md
naghamsleman Nov 16, 2025
c46e2ab
Add files via upload
naghamsleman Nov 16, 2025
b4b2dca
Create readme.md
naghamsleman Nov 17, 2025
2dd6c52
Add files via upload
naghamsleman Nov 17, 2025
3c8771b
Create readme.md
naghamsleman Nov 24, 2025
ce97018
Add files via upload
naghamsleman Nov 24, 2025
fbcd71b
Create readme.md
naghamsleman Dec 14, 2025
1905b1a
Add files via upload
naghamsleman Dec 14, 2025
68ef9ca
Add files via upload
naghamsleman Dec 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions SRS/practice_1/Task_1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
1. Look in the [table](https://docs.google.com/spreadsheets/d/1MFO6x2WuOzIZvYZm08gwcFw2lOKu-bSqmNkslq-nyiA/edit?usp=sharing) and find yourself:

3. Look in the "Integrators.ipynb" file and use these functions for your task.
4. Solve analytically the ODE in the form of:

$a \cdot \ddot{x} + b \cdot \dot{x} + c \cdot x = d$

5. From the list take coefficients of your ODE and solve them with three integrators: Explicit/Implicit Euler, Rung-Kutta methods.
6. Compare results of these methods with analytical solution, dicsuss and conclude your thoughts in the .pdf report.
7. Name of the report should be "Your_ISU_number_YourName_task1.pdf"
161 changes: 161 additions & 0 deletions SRS/practice_1/integrators.ipynb

Large diffs are not rendered by default.

20 changes: 0 additions & 20 deletions SRS/practice_1/practice_1.ipynb

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Binary file not shown.
227 changes: 227 additions & 0 deletions SRS/practice_1/submissions/476937_NaghamSleman_Task1/task_1.ipynb

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions SRS/practice_1/submissions/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Name your project as "Your_ISU_Number_YourName_Task1"
14 changes: 14 additions & 0 deletions SRS/practice_2/Task_2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
1. Look in the [table](https://docs.google.com/spreadsheets/d/1cV1CvAwOWxDQwrhasFfoV0_T6r5pmklhSiCanFWS2I4/edit?usp=sharing) and find yourself:

3. Compose the ODE from the mass spring damper system using variants below:

<img src="https://github.com/user-attachments/assets/715d3c7a-7764-497d-b4ca-d71293accd90"
alt="image"
width="400" />

Use method described in ```SRS/lecture_1/lecture_1.pdf```.

4. **Try** to solve analytically the ODE you composed. If you can't solve it, describe the reason and why?

5. Compare results of these methods with analytical solution (if it exists), dicsuss and conclude your thoughts in the .pdf report.
6. Name of the report should be "Your_ISU_number_YourName_task2.pdf"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Binary file not shown.
271 changes: 271 additions & 0 deletions SRS/practice_2/submissions/476937_NaghamSleman_task2/task_2.ipynb

Large diffs are not rendered by default.

Binary file not shown.
1 change: 1 addition & 0 deletions SRS/practice_2/submissions/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Name your project as "Your_ISU_Number_YourName_Task2"
31 changes: 31 additions & 0 deletions SRS/practice_3/476937_NaghamSleman_task3/import mujoco2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import mujoco
import mujoco.viewer

# ----------------------------------------------------
# Load the XML model
# ----------------------------------------------------
model_path = r"C:\Users\Nagham\Documents\mujoco_models\model2.xml"

model = mujoco.MjModel.from_xml_path(model_path)
data = mujoco.MjData(model)

# ----------------------------------------------------
# Launch the passive viewer
# ----------------------------------------------------
viewer = mujoco.viewer.launch_passive(model, data)

# ----------------------------------------------------
# Configure the camera
# ----------------------------------------------------
viewer.cam.lookat[:] = [0.07, 0, 0] # Look at the middle of the arm
viewer.cam.distance = 0.6 # Move camera further
viewer.cam.elevation = -10 # Slight tilt
viewer.cam.azimuth = 90 # Side view

print("Viewer is running. Press Enter to close...")

# ----------------------------------------------------
# Wait for user input and close viewer
# ----------------------------------------------------
input()
viewer.close()
58 changes: 58 additions & 0 deletions SRS/practice_3/476937_NaghamSleman_task3/import time1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import time
import mujoco
import mujoco.viewer
import matplotlib.pyplot as plt

# Load the MuJoCo model
model_path = r"C:\Users\Nagham\Documents\mujoco_models\model2.xml"
model = mujoco.MjModel.from_xml_path(model_path)
data_ = mujoco.MjData(model)

# Storage for recording joint motion
joint1_positions = []
joint2_positions = []

# Get the joint indices by name
elbow_id = mujoco.mj_name2id(model, mujoco.mjtObj.mjOBJ_JOINT, 'elbow')
wrist_id = mujoco.mj_name2id(model, mujoco.mjtObj.mjOBJ_JOINT, 'wrist')

elbow_index = model.jnt_qposadr[elbow_id]
wrist_index = model.jnt_qposadr[wrist_id]

# Apply initial conditions to trigger motion
data_.qpos[elbow_index] = 0.2
data_.qpos[wrist_index] = -0.1

# Run forward pass before starting the simulation
mujoco.mj_forward(model, data_)

# Launch viewer in passive mode
with mujoco.viewer.launch_passive(model, data_) as viewer:
start = time.time()

while viewer.is_running() and time.time() - start < 15:
step_start = time.time()

# Run one physics step
mujoco.mj_step(model, data_)
viewer.sync()

# Record joint angles
joint1_positions.append(data_.qpos[elbow_index])
joint2_positions.append(data_.qpos[wrist_index])

# Maintain stable real-time stepping
dt = model.opt.timestep - (time.time() - step_start)
if dt > 0:
time.sleep(dt)

# Plot joint trajectories
plt.figure(figsize=(12,5))
plt.plot(joint1_positions, label="Joint 1 (Elbow)")
plt.plot(joint2_positions, label="Joint 2 (Wrist)")
plt.xlabel("Time Step")
plt.ylabel("Joint Position (rad)")
plt.title("Joint Positions Over Time During Passive Simulation")
plt.grid(True)
plt.legend()
plt.show()
113 changes: 113 additions & 0 deletions SRS/practice_3/476937_NaghamSleman_task3/model2.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
<mujoco model="RR_Mechanism">

<option gravity="0 0 0" integrator="Euler"/>

<statistic center="0 0 0" extent="0.2"/>

<visual>
<rgba haze=".8 .3 .3 1"/>
</visual>

<default>
<joint axis="0 1 0" damping="0.000005"/>
<geom type="capsule"/>
</default>

<asset>
<texture name="texplane" type="2d" builtin="checker"
rgb1=".7 .7 .25" rgb2=".25 .7 .7"
width="512" height="512" mark="cross" markrgb=".8 .8 .8"/>
<material name="matplane" reflectance="0" texture="texplane"
texrepeat="1 1" texuniform="true"/>
</asset>

<worldbody>

<light pos="0 0 0.25" />
<light pos="0 0 3" dir="0 0 -1" directional="false" />

<geom name="floor" pos="0 0 -0.14" size="0 0 1"
type="plane" material="matplane" conaffinity="15" condim="3"/>

<!-- LEFT SIDE -->
<body pos="0 0 0">

<geom name="left_bound" type="box" size="0.002 0.06 0.06"
rgba="0.1 0.1 0.7 1" pos="0 0 0"/>

<geom fromto="0 0 0 0.094 0 0"
rgba=".5 .5 .1 .5" size=".002"
contype="0" conaffinity="0"/>

<site name="s1" pos="0.005 0 0.035" size=".002" rgba="1 1 0 1"/>
<site name="s2" pos="0.005 0 -0.035" size=".002" rgba="1 1 0 1"/>

<!-- FIRST JOINT (ELBOW) -->
<body pos="0.094 0 0">

<joint name="elbow"/>

<geom fromto="0 0 0 0.063 0 0"
rgba=".5 .5 .1 .5" size=".002"/>

<geom name="Pulley" type="cylinder"
fromto="0 .007 0 0 -.007 0"
size=".014" rgba=".1 .1 .75 .85"/>

<site name="s3" pos="0 0 0.015" size=".002" rgba="1 1 0 1"/>
<site name="s4" pos="0 0 -0.015" size=".002" rgba="1 1 0 1"/>

<!-- SECOND JOINT (WRIST) -->
<body pos="0.063 0 0">

<joint name="wrist"/>

<geom fromto="0 0 0 0.088 0 0"
rgba=".5 .5 .1 .5" size=".002"/>

<geom name="Pulley2" type="cylinder"
fromto="0 .01 0 0 -.01 0"
size=".02" rgba=".1 .1 .75 .85"/>

<site name="s5" pos="0 0 0.021" size=".002" rgba="1 1 0 1"/>
<site name="s6" pos="0 0 -0.021" size=".002" rgba="1 1 0 1"/>
<site name="s7" pos="0.088 0 0.035" size=".002" rgba="1 1 0 1"/>
<site name="s8" pos="0.088 0 -0.035" size=".002" rgba="1 1 0 1"/>

<!-- RIGHT SIDE -->
<body>
<geom name="right_bound" type="box"
size="0.002 0.055 0.055"
rgba="0.1 0.1 0.7 1"
pos="0.088 0 0"/>
</body>

</body>
</body>
</body>
</worldbody>

<!-- TENDONS -->
<tendon>

<!-- RED SPATIAL TENDON -->
<spatial stiffness="10" rgba="1 0 0 1" width="0.0015">
<site site="s1"/>
<geom geom="Pulley" sidesite="s3"/>
<site site="s3"/>
<geom geom="Pulley2" sidesite="s6"/>
<site site="s8"/>
</spatial>

<!-- GREEN SPATIAL TENDON -->
<spatial stiffness="10" rgba="0 1 0 1" width="0.0015">
<site site="s2"/>
<geom geom="Pulley" sidesite="s4"/>
<site site="s4"/>
<geom geom="Pulley2" sidesite="s5"/>
<site site="s7"/>
</spatial>

</tendon>

</mujoco>
1 change: 1 addition & 0 deletions SRS/practice_3/476937_NaghamSleman_task3/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Binary file not shown.
1 change: 1 addition & 0 deletions SRS/practice_4/476937_NaghamSleman_Task4/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Binary file not shown.
Loading