File tree Expand file tree Collapse file tree 1 file changed +15
-12
lines changed Expand file tree Collapse file tree 1 file changed +15
-12
lines changed Original file line number Diff line number Diff line change 1
1
module RobotOS
2
2
3
3
using PyCall
4
- const __rospy__ = try
5
- pyimport (" rospy" )
6
- catch ex
7
- if (isa (ex, PyCall. PyError) &&
8
- pycall (pybuiltin (" str" ), PyAny, ex. val) == " No module named rospy" )
9
- error (" rospy not found!\n Has an environment setup script been run?" )
10
- else
11
- rethrow (ex)
4
+
5
+ function __init__ ()
6
+ # Put julia's ARGS into python's so remappings will work
7
+ global const __sys__ = pyimport (" sys" )
8
+ __sys__[" argv" ] = ARGS
9
+
10
+ global const __rospy__ = try
11
+ pyimport (" rospy" )
12
+ catch ex
13
+ if (isa (ex, PyCall. PyError) &&
14
+ pycall (pybuiltin (" str" ), PyAny, ex. val) == " No module named rospy" )
15
+ error (" rospy not found!\n Has an environment setup script been run?" )
16
+ else
17
+ rethrow (ex)
18
+ end
12
19
end
13
20
end
14
21
15
- # Put julia's ARGS into python's so remappings will work
16
- py_sys = pyimport (" sys" )
17
- py_sys[" argv" ] = ARGS
18
-
19
22
include (" debug.jl" )
20
23
include (" time.jl" )
21
24
include (" gentypes.jl" )
You can’t perform that action at this time.
0 commit comments