Skip to content

Commit

Permalink
Fix python script errors in action generation
Browse files Browse the repository at this point in the history
Signed-off-by: Victor Lopez <[email protected]>
  • Loading branch information
Victor Lopez committed Nov 13, 2020
1 parent c4be41c commit 4d219a3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions ros1_bridge/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ def generate_cpp(output_path, template_dir):
'interface': interface,
'mapped_msgs': [],
'mapped_services': [],
'mapped_actions': [],
}
if interface_type == 'msg':
data_idl_cpp['mapped_msgs'] += [
Expand All @@ -164,12 +165,13 @@ def generate_cpp(output_path, template_dir):
data_idl_cpp['mapped_services'] += [
s for s in data['services']
if s['ros2_package'] == ros2_package_name and
s['ros2_name'] == interface.message_name],
'mapped_actions': [
s['ros2_name'] == interface.message_name]
if interface_type == 'action':
data_idl_cpp['mapped_actions'] += [
s for s in data['actions']
if s['ros2_package'] == ros2_package_name and
s['ros2_name'] == interface.message_name],
}
s['ros2_name'] == interface.message_name]

template_file = os.path.join(
template_dir, 'interface_factories.cpp.em')
output_file = os.path.join(
Expand Down

0 comments on commit 4d219a3

Please sign in to comment.