Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Jazzy/Rolling with F2C v1.2.1 #82

Merged
merged 25 commits into from
Dec 2, 2024
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
6fad682
[coverage_planning] make it build on rolling with F2C v1.2.1
adivardi Nov 5, 2024
2360f65
fix Werror=maybe-uninitialized
adivardi Nov 21, 2024
16af6a2
restore tests and add missing ament_index_cpp to CMakeLists
adivardi Nov 21, 2024
90577db
update demo launcher for Gazebo Ignition
adivardi Nov 21, 2024
a1c843a
explicitly add models to avoid errors
adivardi Nov 21, 2024
d4b634a
move robot pose and polygon to (0,0)
adivardi Nov 21, 2024
c1b1423
Add .gitignore
adivardi Nov 22, 2024
d54a1d6
Restore robot pose & polygon to (5,5)
adivardi Nov 25, 2024
ad7110e
Update row_coverage_demo_launch.py to Gazebo Ignition
adivardi Nov 25, 2024
247706c
Note on F2C version
adivardi Nov 25, 2024
d8e7df4
Update test workflow
adivardi Nov 25, 2024
ad496a1
lint and format
adivardi Nov 25, 2024
6f749e0
add BTCPP_format to BT xmls
adivardi Nov 26, 2024
8f1946e
CI: change F2C branch and update to Jazzy & Noble
adivardi Nov 26, 2024
cb65987
try F2C v1.2.1
adivardi Nov 27, 2024
8164091
[tmp] ignore F2C compile errors
adivardi Nov 27, 2024
3fc2c29
Update lint step to jazzy
adivardi Nov 27, 2024
3a9e9d1
test with cartesian polygon
adivardi Nov 27, 2024
964bbed
Revert "try F2C v1.2.1"
adivardi Nov 28, 2024
30658a2
Revert "[tmp] ignore F2C compile errors"
adivardi Nov 28, 2024
6a61940
[tmp] rm failing test in opennav_coverage_bt
adivardi Nov 28, 2024
feb6411
switch test to cartesian_frame
adivardi Dec 2, 2024
2f55bc3
restore non-cartesian field test
adivardi Dec 2, 2024
5ff83b3
Revert "[tmp] rm failing test in opennav_coverage_bt"
adivardi Dec 2, 2024
84d85c8
restore rclcpp:shutdown()
adivardi Dec 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update row_coverage_demo_launch.py to Gazebo Ignition
adivardi committed Nov 25, 2024
commit ad7110ec91abd4b204339fa429834d1267e01b20
69 changes: 43 additions & 26 deletions opennav_coverage_demo/launch/row_coverage_demo_launch.py
Original file line number Diff line number Diff line change
@@ -13,11 +13,12 @@
# limitations under the License.

import os
import tempfile

from ament_index_python.packages import get_package_share_directory

from launch import LaunchDescription
from launch.actions import ExecuteProcess, IncludeLaunchDescription
from launch.actions import ExecuteProcess, IncludeLaunchDescription, OpaqueFunction, RegisterEventHandler
from launch.event_handlers import OnShutdown
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch_ros.actions import Node

@@ -26,22 +27,21 @@ def generate_launch_description():
nav2_bringup_dir = get_package_share_directory('nav2_bringup')
coverage_demo_dir = get_package_share_directory('opennav_coverage_demo')
rviz_config_file = os.path.join(coverage_demo_dir, 'rviz_config.rviz')
sim_dir = get_package_share_directory("nav2_minimal_tb3_sim")

world = os.path.join(coverage_demo_dir, 'blank.world')
param_file_path = os.path.join(coverage_demo_dir, 'demo_params.yaml')
sdf = os.path.join(nav2_bringup_dir, 'worlds', 'waffle.model')
robot_sdf = os.path.join(sim_dir, "urdf", "gz_waffle.sdf.xacro")

# start the simulation
start_gazebo_server_cmd = ExecuteProcess(
cmd=['gzserver', '-s', 'libgazebo_ros_init.so',
'-s', 'libgazebo_ros_factory.so', world],
cwd=[coverage_demo_dir], output='screen')

# start_gazebo_client_cmd = ExecuteProcess(
# cmd=['gzclient'],
# cwd=[coverage_demo_dir], output='screen')

urdf = os.path.join(nav2_bringup_dir, 'urdf', 'turtlebot3_waffle.urdf')
world_sdf = tempfile.mktemp(prefix="nav2_", suffix=".sdf")
world_sdf_xacro = ExecuteProcess(cmd=["xacro", "-o", world_sdf, "headless:=false", world])
gazebo_server = ExecuteProcess(
cmd=["gz", "sim", "-r", "-s", world_sdf],
output="screen",
)

urdf = os.path.join(sim_dir, 'urdf', 'turtlebot3_waffle.urdf')
with open(urdf, 'r') as infp:
robot_description = infp.read()

@@ -53,15 +53,29 @@ def generate_launch_description():
parameters=[{'use_sim_time': True,
'robot_description': robot_description}])

start_gazebo_spawner_cmd = Node(
package='gazebo_ros',
executable='spawn_entity.py',
output='screen',
arguments=[
'-entity', 'tb3',
'-file', sdf,
'-x', '6.23', '-y', '15.0', '-z', '0.10',
'-R', '0.0', '-P', '0.0', '-Y', '-1.5708'])
remove_temp_sdf_file = RegisterEventHandler(
event_handler=OnShutdown(on_shutdown=[OpaqueFunction(function=lambda _: os.remove(world_sdf))])
)

gazebo_client = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
os.path.join(get_package_share_directory("ros_gz_sim"), "launch", "gz_sim.launch.py")
),
launch_arguments={"gz_args": ["-v4 -g "]}.items(),
)

start_gazebo_spawner_cmd = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
os.path.join(sim_dir, 'launch', 'spawn_tb3.launch.py')),
launch_arguments={'namespace': '',
'robot_name': 'turtlebot3_waffle',
'robot_sdf': robot_sdf,
'x_pose': str(6.23),
'y_pose': str(15.0),
'z_pose': str(0.1),
'roll': str(0.0),
'pitch': str(0.0),
'yaw': str(-1.5708)}.items())

# start the visualization
rviz_cmd = IncludeLaunchDescription(
@@ -80,7 +94,7 @@ def generate_launch_description():
package='tf2_ros',
executable='static_transform_publisher',
output='screen',
arguments=['0', '0', '0', '0', '0', '0', 'map', 'odom'])
arguments=['6.23', '15', '0', '0', '0', '0', 'map', 'odom'])
fake_gps_cmd = Node(
package='tf2_ros',
executable='static_transform_publisher',
@@ -95,10 +109,13 @@ def generate_launch_description():
output='screen')

ld = LaunchDescription()
ld.add_action(start_gazebo_server_cmd)
# ld.add_action(start_gazebo_client_cmd)
ld.add_action(start_robot_state_publisher_cmd)
ld.add_action(world_sdf_xacro)
ld.add_action(remove_temp_sdf_file)
ld.add_action(gazebo_server)
ld.add_action(gazebo_client)
ld.add_action(start_gazebo_spawner_cmd)

ld.add_action(start_robot_state_publisher_cmd)
ld.add_action(rviz_cmd)
ld.add_action(bringup_cmd)
ld.add_action(fake_localization_cmd)