Skip to content

Commit

Permalink
Merge branch 'develop' into expose_digital_IO
Browse files Browse the repository at this point in the history
# Conflicts:
#	source/pyromocc/source/pyromocc.cpp
  • Loading branch information
androst committed Feb 28, 2024
2 parents 72a2fed + 036bc8d commit 3c828d8
Show file tree
Hide file tree
Showing 16 changed files with 674 additions and 84 deletions.
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,26 +42,30 @@ print(robot.operational_config)
```

### Setup and build ###
For building libromocc, you need to have CMake installed.

```bash
git clone https://github.com/SINTEFMedtek/libromocc.git
cd libromocc
mkdir build
cd build
cmake ..
make -j8
```

### Setup and build (Windows) ###
#### Ubuntu ####

These instructions assume you have Visual Studio and CMake GUI available on your computer.
```bash
git clone https://github.com/SINTEFMedtek/libromocc.git
cd libromocc
mkdir build
cd build
cmake-gui.exe ..
cmake ..
make -j 4
```

#### Windows ####
```bash
cmake .. -G "Visual Studio 16 2019" -A x64 # Change generator string to reflect your VS version
cmake --build . --config Release -j 4
```

##### Visual studio #####

Update the paths to the source code and the build directory as needed:
- Source: ```<path_to>/libromocc/source```
- Build: ```<path_to>/libromocc/build```
Expand Down
18 changes: 18 additions & 0 deletions source/pyromocc/examples/spacemouse_control.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import time

from pyromocc.tools import SpaceMouse
from pyromocc import Robot

robot = Robot(ip="localhost", port=30003)
robot.connect()

space_mouse = SpaceMouse()
space_mouse.connect()


while True:
raw_state = space_mouse.get_operational_config(calibrated=True)
target_speed = [raw_state[0]*100, raw_state[1]*100, raw_state[2]*100,
raw_state[3]*100, raw_state[4]*100, raw_state[5]*100]
robot.speedl(target_speed, 100, 0.5)
time.sleep(0.01)
Loading

0 comments on commit 3c828d8

Please sign in to comment.