Skip to content

Commit

Permalink
addressing #360
Browse files Browse the repository at this point in the history
  • Loading branch information
alphaville committed Oct 14, 2024
1 parent 0c49eb7 commit c4af726
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 5 additions & 0 deletions open-codegen/opengen/builder/optimizer_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,11 @@ def build(self):
self.__build_python_bindings()

if self.__build_config.ros_config is not None:
if self.__generate_not_build:
self.__logger.fatal(
"Do not use with_ros and with_generate_not_build_flag simultaneously")
raise ValueError(
"Unless the optimiser has been built, a ROS package cannot be generated")
ros_builder = RosBuilder(
self.__meta,
self.__build_config,
Expand Down
5 changes: 1 addition & 4 deletions open-codegen/opengen/builder/ros_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,7 @@ def __copy__ros_files(self):
target_ros_dir, 'include', header_file_name))
original_include_file = os.path.abspath(
os.path.join(self.__target_dir(), header_file_name))
try:
shutil.copyfile(original_include_file, target_include_filename)
except:
pass
shutil.copyfile(original_include_file, target_include_filename)

# 2. --- copy library file
lib_file_name = 'lib' + self.__meta.optimizer_name + '.a'
Expand Down

0 comments on commit c4af726

Please sign in to comment.