Skip to content

Commit

Permalink
Merge pull request #164 from GPrathap/humble-dev
Browse files Browse the repository at this point in the history
fixing colcon build issue
  • Loading branch information
Iranaphor authored Oct 31, 2023
2 parents 26f6d98 + 9dd67eb commit ac17aaa
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
8 changes: 6 additions & 2 deletions topological_navigation/setup.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
from setuptools import find_packages
from setuptools import setup
from glob import glob

package_name = 'topological_navigation'

setup(
name=package_name,
version='3.0.0',
packages=[package_name],
packages=find_packages(),
data_files=[
('share/ament_index/resource_index/packages',
['resource/' + package_name]),
('share/' + package_name, ['package.xml']),
('share/' + package_name + '/config/', glob('config/*', recursive=True))
],
install_requires=['sympy>=1.5.1'],
install_requires=['setuptools'],
zip_safe=True,
maintainer='Adam Binch',
maintainer_email='[email protected]',
Expand Down Expand Up @@ -51,3 +54,4 @@




19 changes: 10 additions & 9 deletions topological_navigation/topological_navigation/manager2.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import rosidl_runtime_py
import tf2_ros
from rclpy.qos import QoSProfile, HistoryPolicy, ReliabilityPolicy, DurabilityPolicy

from ament_index_python.packages import get_package_share_directory
from topological_navigation_msgs.msg import *
import topological_navigation_msgs.msg
import std_msgs.msg
Expand Down Expand Up @@ -44,23 +44,24 @@ class map_manager_2(rclpy.node.Node):
def __init__(self, advertise_srvs=True):
super().__init__('topological_map_manager_2')

self.cache_maps = self.get_parameter_or("~cache_topological_maps", Parameter('bool', Parameter.Type.BOOL, False)).get_parameter_value()

self.auto_write = self.get_parameter_or("~auto_write_topological_maps", Parameter('bool', Parameter.Type.BOOL, False)).get_parameter_value()
self.cache_maps = self.get_parameter_or("~cache_topological_maps", Parameter('bool', Parameter.Type.BOOL, False)).value
self.auto_write = self.get_parameter_or("~auto_write_topological_maps", Parameter('bool', Parameter.Type.BOOL, False)).value

package_path = get_package_share_directory('topological_navigation')
nav_config = str(os.path.join(package_path, 'config', 'move_base_goal.yaml'))

self.nav_config = str(self.get_parameter_or("nav_config", Parameter('str', Parameter.Type.STRING, nav_config)).value)
self.get_logger().info("cache_topological_maps: {}".format(self.cache_maps))
self.get_logger().info("auto_write_topological_maps: {}".format(self.auto_write))
self.get_logger().info("nav config file: {}".format(self.nav_config))

self.cache_dir = os.path.join(os.path.expanduser("~"), ".ros", "topological_maps")
if not os.path.exists(self.cache_dir):
os.mkdir(self.cache_dir)

self.goal_mappings = {}
#package_path = packages.get_package_share_directory('topological_navigation')
#mb_goal_f = "{}/config/{}".format(package_path, "move_base_goal.yaml")

mb_goal_f = os.path.join(topological_navigation.__path__[0], '..', 'config', 'move_base_goal.yaml')
with open(mb_goal_f, "r") as f:

with open(self.nav_config, "r") as f:
self.move_base_goal = yaml.safe_load(f)["topological_navigation/move_base_goal"]

if advertise_srvs:
Expand Down

0 comments on commit ac17aaa

Please sign in to comment.