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

[Python] remove rospkg

rospkg was used to find a path to the current directory. This was
updated in the previous commit, so now rospkg is useless.
parent e22d197d
#! /usr/bin/env python #! /usr/bin/env python
import sys import sys
import rospy import rospy
import rospkg
import time import time
from os.path import abspath, dirname, join from os.path import abspath, dirname, join
...@@ -42,12 +41,7 @@ def runTest(): ...@@ -42,12 +41,7 @@ def runTest():
runCommandStartDynamicGraph = rospy.ServiceProxy('start_dynamic_graph', runCommandStartDynamicGraph = rospy.ServiceProxy('start_dynamic_graph',
Empty) Empty)
# get an instance of RosPack with the default search paths
rospack = rospkg.RosPack()
# get the file path for rospy_tutorials # get the file path for rospy_tutorials
lpath = rospack.get_path(PKG_NAME)
print(lpath)
initCode = open(join(dirname(abspath(__file__)), 'appli.py'), "r").read().split("\n") initCode = open(join(dirname(abspath(__file__)), 'appli.py'), "r").read().split("\n")
rospy.loginfo("Stack of Tasks launched") rospy.loginfo("Stack of Tasks launched")
......
#! /usr/bin/env python #! /usr/bin/env python
import sys import sys
import rospy import rospy
import rospkg
import time import time
import unittest import unittest
import math import math
...@@ -18,12 +17,7 @@ PKG_NAME='talos_integration_tests' ...@@ -18,12 +17,7 @@ PKG_NAME='talos_integration_tests'
from sot_talos_balance.utils.run_test_utils import \ from sot_talos_balance.utils.run_test_utils import \
run_ft_calibration, run_test, runCommandClient run_ft_calibration, run_test, runCommandClient
# get an instance of RosPack with the default search paths
rospack = rospkg.RosPack()
# get the file path for rospy_tutorials # get the file path for rospy_tutorials
lpath = rospack.get_path(PKG_NAME)
print(lpath)
appli_file_name = join(dirname(abspath(__file__)), 'appli_dcmZmpControl_file.py') appli_file_name = join(dirname(abspath(__file__)), 'appli_dcmZmpControl_file.py')
time.sleep(2) time.sleep(2)
......
Supports Markdown
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