Final Event
Modify the Setup
For the demonstration of the final project in our lab, we need you to remove both the scenario_node
and the robot_marker_publisher
from your launch setup.
We will run these nodes on another machine.
Attention
Not removing these nodes from your launch setup will cause node/topic collisions.
Remove this code block from final_project/launch/final_project.launch.py
74Node(
75 executable='scenario_node',
76 package='fav',
77 parameters=[
78 {
79 'scenario': LaunchConfiguration('scenario'),
80 'use_sim_time': LaunchConfiguration('use_sim_time'),
81 },
82 ],
83),
84Node(
85 executable='robot_marker_publisher',
86 package='fav',
87 parameters=[
88 {
89 'use_sim_time': LaunchConfiguration('use_sim_time'),
90 },
91 ],
92),
Since we will show the rviz
visualization as well, you might consider removing the rviz
node as well for performance reasons.
But that is up to your personal preferences.
95rviz_file = str(
96 get_package_share_path('final_project') / 'config/rviz.rviz')
97
98action = Node(
99 executable='rviz2',
100 package='rviz2',
101 name='rviz2',
102 arguments=['-d', rviz_file, '--ros-args', '--log-level', 'error'],
103)
104launch_description.add_action(action)
Run the Code
Also keep in mind that we need to adapt the launch command to run the setup slightly, because we do not need sim time for the lab. We do not need to specify a scenario either.
$ ros2 launch final_project final_project.launch.py vehicle_name:=bluerov01 use_sim_time:=false