Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
sot-talos
Commits
3dacfd28
Commit
3dacfd28
authored
Sep 23, 2019
by
Guilhem Saurel
Browse files
PYTHONPATH default to empty string, fix #5
parent
00fc555e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/sot-talos-controller.cpp
View file @
3dacfd28
/*
/*
* Copyright 2016,
* Copyright 2016,
*
*
* Rohan Budhiraja
* Rohan Budhiraja
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* LAAS, CNRS
* LAAS, CNRS
*
*
* This file is part of TALOSController.
* This file is part of TALOSController.
* TALOSController is a free software,
* TALOSController is a free software,
*
*
*/
*/
...
@@ -49,8 +49,8 @@ void SoTTalosController::init()
...
@@ -49,8 +49,8 @@ void SoTTalosController::init()
interpreter_
=
boost
::
shared_ptr
<
dynamicgraph
::
Interpreter
>
(
interpreter_
=
boost
::
shared_ptr
<
dynamicgraph
::
Interpreter
>
(
new
dynamicgraph
::
Interpreter
(
nh
));
new
dynamicgraph
::
Interpreter
(
nh
));
sotDEBUG
(
25
)
<<
__FILE__
<<
":"
sotDEBUG
(
25
)
<<
__FILE__
<<
":"
<<
__FUNCTION__
<<
"(#"
<<
__FUNCTION__
<<
"(#"
<<
__LINE__
<<
" )"
<<
std
::
endl
;
<<
__LINE__
<<
" )"
<<
std
::
endl
;
double
ts
=
ros
::
param
::
param
<
double
>
(
"/sot_controller/dt"
,
SoTTalosDevice
::
TIMESTEP_DEFAULT
);
double
ts
=
ros
::
param
::
param
<
double
>
(
"/sot_controller/dt"
,
SoTTalosDevice
::
TIMESTEP_DEFAULT
);
...
@@ -85,7 +85,7 @@ cleanupSetSensors(map<string, dgsot::SensorValues> &SensorsIn)
...
@@ -85,7 +85,7 @@ cleanupSetSensors(map<string, dgsot::SensorValues> &SensorsIn)
void
SoTTalosController
::
void
SoTTalosController
::
getControl
(
map
<
string
,
dgsot
::
ControlValues
>
&
controlOut
)
getControl
(
map
<
string
,
dgsot
::
ControlValues
>
&
controlOut
)
{
{
try
try
{
{
sotDEBUG
(
25
)
<<
__FILE__
<<
__FUNCTION__
<<
"(#"
<<
__LINE__
<<
")"
<<
endl
;
sotDEBUG
(
25
)
<<
__FILE__
<<
__FUNCTION__
<<
"(#"
<<
__LINE__
<<
")"
<<
endl
;
device_
->
getControl
(
controlOut
);
device_
->
getControl
(
controlOut
);
...
@@ -94,10 +94,10 @@ getControl(map<string,dgsot::ControlValues> &controlOut)
...
@@ -94,10 +94,10 @@ getControl(map<string,dgsot::ControlValues> &controlOut)
catch
(
dynamicgraph
::
sot
::
ExceptionAbstract
&
err
)
catch
(
dynamicgraph
::
sot
::
ExceptionAbstract
&
err
)
{
{
std
::
cout
<<
__FILE__
<<
" "
std
::
cout
<<
__FILE__
<<
" "
<<
__FUNCTION__
<<
" ("
<<
__FUNCTION__
<<
" ("
<<
__LINE__
<<
") "
<<
__LINE__
<<
") "
<<
err
.
getStringMessage
()
<<
err
.
getStringMessage
()
<<
endl
;
<<
endl
;
throw
err
;
throw
err
;
}
}
...
@@ -147,7 +147,7 @@ startupPython()
...
@@ -147,7 +147,7 @@ startupPython()
{
{
std
::
ofstream
aof
(
LOG_PYTHON
.
c_str
());
std
::
ofstream
aof
(
LOG_PYTHON
.
c_str
());
runPython
(
aof
,
"import sys, os"
,
*
interpreter_
);
runPython
(
aof
,
"import sys, os"
,
*
interpreter_
);
runPython
(
aof
,
"pythonpath = os.environ
[
'PYTHONPATH'
]
"
,
*
interpreter_
);
runPython
(
aof
,
"pythonpath = os.environ
.get(
'PYTHONPATH'
, '')
"
,
*
interpreter_
);
runPython
(
aof
,
"path = []"
,
*
interpreter_
);
runPython
(
aof
,
"path = []"
,
*
interpreter_
);
runPython
(
aof
,
runPython
(
aof
,
"for p in pythonpath.split(':'):
\n
"
"for p in pythonpath.split(':'):
\n
"
...
@@ -163,4 +163,3 @@ startupPython()
...
@@ -163,4 +163,3 @@ startupPython()
dynamicgraph
::
rosInit
(
true
);
dynamicgraph
::
rosInit
(
true
);
aof
.
close
();
aof
.
close
();
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment