Skip to content

Commit

Permalink
Node discovery using add_library
Browse files Browse the repository at this point in the history
  • Loading branch information
divbugger committed Nov 6, 2023
1 parent f152434 commit a2cdb2f
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion Ros_Extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import ros_metamodels.ros_metamodel_core as RosModelMetamodel

import rospkg
from copy import deepcopy
#import ament_index_python
from haros.extractor import NodeExtractor, RoscppExtractor, RospyExtractor
from haros.metamodel import Node, Package, RosName, SourceFile
Expand Down Expand Up @@ -69,7 +70,9 @@ def extract_node(self, name, node_name, pkg_name, ns, ws, rossystem):
model_str = ""
if os.path.isfile(os.path.join(self.pkg.path, "CMakeLists.txt")):
parser.parse(os.path.join(self.pkg.path, "CMakeLists.txt"))
for target in parser.executables.values():
node_name_dict = deepcopy(parser.executables)
node_name_dict.update(deepcopy(parser.libraries))
for target in node_name_dict.values():
print("INFO: Found artifact: "+target.output_name)
if (self.args.a):
node_name = target.output_name
Expand Down
Binary file removed __pycache__/Ros_Extractor.cpython-310.pyc
Binary file not shown.
Binary file removed __pycache__/file_handling.cpython-310.pyc
Binary file not shown.
Binary file removed __pycache__/ros2runner.cpython-310.pyc
Binary file not shown.
Binary file removed __pycache__/ros_pkg_runner.cpython-310.pyc
Binary file not shown.
4 changes: 2 additions & 2 deletions haros_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@

def main():

pkgName = 'joystick_drivers'
pkgName = 'aruco_ros'
NodeName = '--all'
typeOfRequest = 'node'
pathToOutput = "/home/divya/ros2_ws/runner_op"
pathToROSws = "/home/divya/ros2_ws"
gitRepo = "https://github.com/ros-drivers/joystick_drivers.git -b ros2"
gitRepo = "https://github.com/pal-robotics/aruco_ros/ -b humble-devel"

# print("pkgName:", pkgName)
# print("NodeName:", NodeName)
Expand Down

0 comments on commit a2cdb2f

Please sign in to comment.