File tree Expand file tree Collapse file tree 2 files changed +21
-6
lines changed Expand file tree Collapse file tree 2 files changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -28,16 +28,31 @@ void setProcessScheduler()
28
28
param.sched_priority = sched_get_priority_max (SCHED_FIFO);
29
29
if (sched_setscheduler (pid, SCHED_FIFO, ¶m) == -1 )
30
30
{
31
- std::cout << " [ERROR] function setprocessscheduler failed \n " ;
31
+ std::cout << " [ERROR] function set process scheduler failed \n " ;
32
32
}
33
33
}
34
34
35
- int main ()
35
+ int main (int argc, char **argv )
36
36
{
37
37
setProcessScheduler ();
38
38
39
39
double dt = 0.001 ;
40
- int cmd_panel_id = 1 ; // Wireless=1, keyboard=2
40
+ int cmd_panel_id; // Wireless=1, keyboard=2
41
+
42
+ if (argc > 1 ) {
43
+ if (std::string (argv[1 ]) == " wireless" ) {
44
+ cmd_panel_id = 1 ;
45
+ } else if (std::string (argv[1 ]) == " keyboard" ) {
46
+ cmd_panel_id = 2 ;
47
+ } else {
48
+ std::cout << " Invalid command panel. Please enter either 'wireless' or 'keyboard'." << std::endl;
49
+ return 1 ;
50
+ }
51
+ }
52
+ else {
53
+ cmd_panel_id = 2 ; // Default to keyboard
54
+ }
55
+
41
56
IOInterface *ioInter;
42
57
ManipulationUDP *manipulationIO;
43
58
Original file line number Diff line number Diff line change 6
6
- shell_command :
7
7
- roslaunch quadruped_sim world_only.launch
8
8
shell_command_before :
9
- - source ~/Projects/manipulation_ws /devel/setup.bash
9
+ - source $PWD/../../../.. /devel/setup.bash
10
10
11
11
- window_name : Robot1
12
12
layout : tiled
@@ -18,7 +18,7 @@ windows:
18
18
- sleep 6
19
19
- rosrun quadruped_sim quad_sim_control $robot_type __ns:=$ns
20
20
shell_command_before :
21
- - source ~/Projects/manipulation_ws /devel/setup.bash
21
+ - source $PWD/../../../.. /devel/setup.bash
22
22
- export ns=robot_1
23
23
- export robot_type=a1
24
24
- export x_pos=0.0
@@ -35,7 +35,7 @@ windows:
35
35
- sleep 6
36
36
- rosrun quadruped_sim quad_sim_control $robot_type __ns:=$ns
37
37
shell_command_before :
38
- - source ~/Projects/manipulation_ws /devel/setup.bash
38
+ - source $PWD/../../../.. /devel/setup.bash
39
39
- export ns=robot_2
40
40
- export robot_type=aliengo
41
41
- export x_pos=0.0
You can’t perform that action at this time.
0 commit comments