Skip to content

Commit edd874e

Browse files
committed
updated M1 read me file, and need to finalize M1ROS setup
1 parent 7a7bf4a commit edd874e

3 files changed

Lines changed: 124 additions & 0 deletions

File tree

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
# Hardware Testing - AnkleMotus M1 Ankle Robot
2+
3+
This page introduces the M1DemoMachine and M1ROSDemoMachine, two example CORC apps showing the basic use of the M1 ankle rehabilitation robot.
4+
5+
The M1 is a one DoF admittance based robot developed by Fourier Intelligence:
6+
7+
![ArmMotus M2 with frames](../img/M1_robot.png)
8+
AnkleMotus M1 and torque control framework.
9+
10+
The state machine code can be found in the folder `src/apps/M1DemoMachine`.
11+
12+
It demonstrates the use of:
13+
- The different control modes of M1 (position, velocity, or torque)
14+
- The use of the force measurements
15+
16+
The state machine code can be found in the folder `src/apps/M1ROSDemoMachine`.
17+
18+
It demonstrates the use of:
19+
- The different control modes of M1 in ROS system (position, velocity, or torque)
20+
- The use of the force measurements
21+
22+
## Setup instruction
23+
24+
It is assumed that an Ubuntu PC is used and ROS is installed. If this is not the case for you, please visit [here](InstallLinux.md) and [here](InstallROS.md).
25+
26+
If not already installed, install ros_control:
27+
```bash
28+
$ sudo apt-get install ros-<melodic or noetic>-ros-control ros-<melodic or noetic>-ros-controllers
29+
```
30+
31+
Create a catkin workspace if you don't have one yet:
32+
```bash
33+
$ mkdir -p ~/catkin_ws/src
34+
$ cd ~/catkin_ws/
35+
$ catkin build
36+
```
37+
38+
Clone CORC and the required packages into your workspace:
39+
```bash
40+
$ cd ~/catkin_ws/src
41+
$ git clone --recurse-submodules https://github.com/UniMelbHumanRoboticsLab/CANOpenRobotController.git
42+
```
43+
44+
## Build and run M1DemoMachine
45+
46+
Configure the CMakeList.txt, select the M1DemoMachine, and set the flags for using a real robot without ROS support:
47+
48+
```cmake
49+
#set (STATE_MACHINE_NAME "ExoTestMachine")
50+
set (STATE_MACHINE_NAME "M1DemoMachine")
51+
#set (STATE_MACHINE_NAME "M2DemoMachine")
52+
#set (STATE_MACHINE_NAME "M3DemoMachine")
53+
#set (STATE_MACHINE_NAME "X2DemoMachine")
54+
#set (STATE_MACHINE_NAME "LoggingDevice")
55+
# Comment to use actual hardware, uncomment for a nor robot (virtual) app
56+
set(NO_ROBOT OFF)
57+
# ROS Flag. set ON if you want to use ROS. Else, set OFF.
58+
set(USE_ROS OFF)
59+
```
60+
61+
Build CORC:
62+
```bash
63+
$ cd ~/catkin_ws
64+
$ catkin build CORC
65+
$ source devel/setup.bash
66+
```
67+
68+
Initialize the CAN device (No need to repeat this step, unless you restart your PC):
69+
70+
```bash
71+
$ cd script
72+
$ ./initCAN0.sh
73+
```
74+
75+
Run the compiled executable file:
76+
```bash
77+
$ cd ~/catkin_ws
78+
$ sudo ./build/CORC/M1DemoMachine_APP
79+
```
80+
81+
Use keyboard to explore different controllers:
82+
- Key S: start zeroing/calibration
83+
- Key X: start monitoring torque reading
84+
- Key A: position, velocity, and torque controller demonstrations
85+
- Key Q: return to idle state
86+
87+
## Build and run M1ROSDemoMachine (To be tested)
88+
89+
Configure the CMakeList.txt, select the M1DemoMachine, and set the flags for using a real robot without ROS support:
90+
91+
```cmake
92+
#set (STATE_MACHINE_NAME "ExoTestMachine")
93+
#set (STATE_MACHINE_NAME "M1DemoMachine")
94+
#set (STATE_MACHINE_NAME "M2DemoMachine")
95+
#set (STATE_MACHINE_NAME "M3DemoMachine")
96+
#set (STATE_MACHINE_NAME "X2DemoMachine")
97+
set (STATE_MACHINE_NAME "M1ROSDemoMachine")
98+
#set (STATE_MACHINE_NAME "LoggingDevice")
99+
# Comment to use actual hardware, uncomment for a nor robot (virtual) app
100+
set(NO_ROBOT OFF)
101+
# ROS Flag. set ON if you want to use ROS. Else, set OFF.
102+
set(USE_ROS ON)
103+
```
104+
105+
Build CORC:
106+
```bash
107+
$ cd ~/catkin_ws
108+
$ catkin build CORC
109+
$ source devel/setup.bash
110+
```
111+
112+
Initialize the CAN device (No need to repeat this step, unless you restart your PC):
113+
114+
```bash
115+
$ cd script
116+
$ ./initCAN0.sh
117+
```
118+
119+
Run the compiled executable file:
120+
```bash
121+
$ cd ~/catkin_ws
122+
$ roslaunch CORC m1_real.launch
123+
```

doc/img/M1_robot.png

633 KB
Loading

src/apps/M1DemoMachine/M1DemoStates.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ void IdleState::entry(void) {
1616
<< " PRESS S to start zeroing/calibration" << std::endl
1717
<< " PRESS X to start monitoring state" << std::endl
1818
<< " PRESS A to start demon machines" << std::endl
19+
<< " PRESS Q to return idle state" << std::endl
1920
<< "========================" << std::endl;
2021
}
2122

0 commit comments

Comments
 (0)