forked from maribernardes/trajcontrol_jhu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathROS2 command line examples for LISA robot.txt
125 lines (100 loc) · 4.84 KB
/
ROS2 command line examples for LISA robot.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
ROS2 command line for LISA Testbench
TO BUILD SYSTEM PACKAGES:
colcon build --cmake-args -DOpenIGTLink_DIR:PATH=/home/snr/OpenIGTLink-build --symlink-install --allow-overriding stage_control_interfaces
colcon build --cmake-args -DOpenIGTLink_DIR:PATH=/opt/OpenIGTLink-build --symlink-install
TO USE DEBUG MODE:
--ros-args --log-level debug
_______________________________________________________________________________________
1) Launch robot
ros2 launch stage_control stage_control_launch.py sim_level:=2
_______________________________________________________________________________________
2) Move robot to give position (in METERS)
ros2 action send_goal /move_stage stage_control_interfaces/action/MoveStage "{x: 0.00, z: 0.00, eps: 0.0001}"
EXAMPLE: move to initial position
ros2 action send_goal /move_stage stage_control_interfaces/action/MoveStage "{x: 0.050, z: 0.005, eps: 0.0001}"
_______________________________________________________________________________________
3) Send commands (home, zero, ABORT, and any direct command to Newmark controller)
ros2 service call /stage/controller/command stage_control_interfaces/srv/ControllerCommand "command: home"
_______________________________________________________________________________________
4) Registration procedure
a) Launch PlusServer
sudo /opt/PlusBuild-bin/bin/./PlusServerLauncher
b) Launch registration
ros2 launch trajcontrol registration.launch.py
OBS: two files are generated at the "files" folder: registration.csv and registration_points.csv
_______________________________________________________________________________________
5) Estimate initial Jacobian procedure (comment code to change between rand/pre-defined sequence)
a) Launch PlusServer
sudo /opt/PlusBuild-bin/bin/./PlusServerLauncher
b) Launch sequence
ros2 launch trajcontrol init_jacobian.launch.py insertion_length:=-20.0 filename:=NAME
_______________________________________________________________________________________
6) Launch robot in manual mode
a) Launch robot in manual
ros2 launch trajcontrol manual.launch.py
b) Launch keyboard node
ros2 run trajcontrol keypress
c) Use numkeyboard arrows to move robot
_______________________________________________________________________________________
7) Launch robot sequence with pre-defined robot positions without keyboard (waits 3.0sat each)
a) Launch PlusServer
sudo /opt/PlusBuild-bin/bin/./PlusServerLauncher
b) Launch sequence
ros2 launch trajcontrol sequence.launch.py filename:=NAME
_______________________________________________________________________________________
8) Launch robot initialization (pre-defined X robot position) with Z in manual mode
a) Launch PlusServer
sudo /opt/PlusBuild-bin/bin/./PlusServerLauncher
b) Launch sequence
ros2 launch trajcontrol init.launch.py
_______________________________________________________________________________________
9) Launch step-wise proportional compensation
a) Launch PlusServer
sudo /opt/PlusBuild-bin/bin/./PlusServerLauncher
b) Launch sequence
ros2 launch trajcontrol prop_step.launch.py K:=0.05 filename:=NAME
_______________________________________________________________________________________
10) Launch step-wise MPC compensation with JHU needle
a) Launch sequence
ros2 launch trajcontrol mpc_step.launch.py filename:=NAME
b) Run calibration
ros2 run hyperion_interrogator calibrate_sensors --ros-args -r __ns:=/needle
c) Launch keyboard node
ros2 run trajcontrol keypress
d) Use ENTER to start experiment and SPACE to signal each insertion step
10) Launch step-wise demo with JHU needle
a) Launch sequence
ros2 launch trajcontrol demo_smart.launch.py filename:=NAME
ATTENTION: a2) Launch needle separetly (optional - check is demo_smart has needle commented out)
ros2 launch trajcontrol jhu_needle.launch.py
b) Run calibration
ros2 run hyperion_interrogator calibrate_sensors --ros-args -r __ns:=/needle
c) Launch keyboard node
ros2 run trajcontrol keypress
d) Use ENTER to start experiment and SPACE to signal each insertion step
11) Launch test for receiving from Slicer
a) Launch bridge
ros2 launch ros2_igtl_bridge bridge.launch.py
b) Launch system interface
EXTRAS:
A) Record bag files:
ros2 bag record -a -o BAG_NAME
B) Launch JHU needle only:
DEMO:
ros2 launch trajcontrol jhu_needle.launch.py sim_level:=1
Real (option 2):
ros2 launch trajcontrol jhu_needle.launch.py sim_level:=2
Real (option 1):
ros2 launch trajcontrol jhu_needle.launch.py
C) Launch interrogator only:
ros2 launch hyperion_interrogator hyperion_streamer.launch.py ip:=10.0.0.55
D) Check interrogator topics:
ros2 topic echo /needle/sensor/raw
ros2 topic hz /needle/sensor/raw
E) Script to check hyperion interrogator
python3 plotFBGSpectra.py 10.0.0.55
F) Run the sensor depth measurement
In a given port:
ros2 run trajcontrol depth_measurement --ros-args -p port:=ttyACM0
In first available port:
ros2 run trajcontrol depth_measurement