Skip to content

Commit

Permalink
fix: launch ids of the real vehicles now start in their respective ids
Browse files Browse the repository at this point in the history
  • Loading branch information
MarceloJacinto committed May 26, 2024
1 parent dea4708 commit 6e5e481
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions pegasus/launch/real/kopis.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def generate_launch_description():
# --------------------------------

# Set the default vehicle id (note: this is a trick due to the parameter reading limitation in ROS2)
default_vehicle_id = 1
default_vehicle_id = 7
vehicle_id = default_vehicle_id
for arg in sys.argv:
if arg.startswith('vehicle_id:='):
Expand All @@ -26,9 +26,9 @@ def generate_launch_description():
# ----------------------------------------

# Define the standard mavlink port to forward mavlink data (so that it can also be viewed internally by qgroundcontrol)
udp_local_forward_port = 14559 + vehicle_id
udp_local_forward_adress = "udp://127.0.0.1:" + str(udp_local_forward_port)
desktop_arena = "udp://192.168.1.100:15006"
#udp_local_forward_port = 14559 + vehicle_id + 10
#udp_local_forward_adress = "udp://127.0.0.1:" + str(udp_local_forward_port)
#desktop_arena = "udp://192.168.1.100:15006"
#mavlink_forward_addresses = "[" + udp_local_forward_adress + ',' + desktop_arena + "]"
mavlink_forward_addresses = "['']"

Expand All @@ -38,7 +38,7 @@ def generate_launch_description():
namespace_arg = DeclareLaunchArgument('vehicle_ns', default_value='drone', description='Namespace to append to every topic and node name')

# Define the drone MAVLINK IP and PORT
mav_connection_arg = DeclareLaunchArgument('connection', default_value='udp://:15007', description='The interface used to connect to the vehicle')
mav_connection_arg = DeclareLaunchArgument('connection', default_value='udp://:' + str(15000 + vehicle_id), description='The interface used to connect to the vehicle')

# Define the drone MAVLINK forward ips and ports
mavlink_forward_arg = DeclareLaunchArgument('mavlink_forward', default_value=mavlink_forward_addresses, description='A list of ips where to forward mavlink messages')
Expand Down
2 changes: 1 addition & 1 deletion pegasus/launch/real/pegasus.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def generate_launch_description():
# --------------------------------

# Set the default vehicle id (note: this is a trick due to the parameter reading limitation in ROS2)
default_vehicle_id = 1
default_vehicle_id = 8
vehicle_id = default_vehicle_id
for arg in sys.argv:
if arg.startswith('vehicle_id:='):
Expand Down

0 comments on commit 6e5e481

Please sign in to comment.