Commit e22d197d authored by Guilhem Saurel's avatar Guilhem Saurel Committed by olivier stasse
Browse files

[Python] fix paths for applis

I don't even understand this `/lib/`
parent bbfcef5b
......@@ -3,6 +3,7 @@ import sys
import rospy
import rospkg
import time
from os.path import abspath, dirname, join
from std_srvs.srv import *
......@@ -47,8 +48,7 @@ def runTest():
# get the file path for rospy_tutorials
lpath = rospack.get_path(PKG_NAME)
print(lpath)
initCode = open( lpath + '/../../lib/'+PKG_NAME+'/appli.py',\
"r").read().split("\n")
initCode = open(join(dirname(abspath(__file__)), 'appli.py'), "r").read().split("\n")
rospy.loginfo("Stack of Tasks launched")
......
......@@ -5,6 +5,7 @@ import rospkg
import time
import unittest
import math
from os.path import abspath, dirname, join
from std_srvs.srv import *
from dynamic_graph_bridge_msgs.srv import *
......@@ -23,8 +24,7 @@ rospack = rospkg.RosPack()
# get the file path for rospy_tutorials
lpath = rospack.get_path(PKG_NAME)
print(lpath)
appli_file_name =lpath + '/../../lib/'+PKG_NAME+\
'/appli_dcmZmpControl_file.py'
appli_file_name = join(dirname(abspath(__file__)), 'appli_dcmZmpControl_file.py')
time.sleep(2)
rospy.loginfo("Stack of Tasks launched")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment