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

Updating worlds after model reorg #80

Merged
merged 9 commits into from
Aug 23, 2022
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
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
12 changes: 8 additions & 4 deletions buoy_description/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@ project(buoy_description)
find_package(ament_cmake REQUIRED)

# Model Generation
set(BUOY_MODEL_PATH "/models/mbari_wec_base")
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}${BUOY_MODEL_PATH})
set(BUOY_BASE_MODEL_PATH "/models/mbari_wec_base")
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}${BUOY_BASE_MODEL_PATH})
add_custom_command(
OUTPUT model_gen_cmd
COMMAND empy3
${CMAKE_CURRENT_SOURCE_DIR}${BUOY_MODEL_PATH}/model.sdf.em >
${CMAKE_CURRENT_BINARY_DIR}${BUOY_MODEL_PATH}/model.sdf
${CMAKE_CURRENT_SOURCE_DIR}${BUOY_BASE_MODEL_PATH}/model.sdf.em >
${CMAKE_CURRENT_BINARY_DIR}${BUOY_BASE_MODEL_PATH}/model.sdf
)
set(BUOY_MODEL_PATH "/models/mbari_wec")
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}${BUOY_MODEL_PATH})
set(BUOY_ROS_MODEL_PATH "/models/mbari_wec_ros")
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}${BUOY_ROS_MODEL_PATH})

add_custom_target(model_gen_target ALL
DEPENDS model_gen_cmd
Expand Down
2 changes: 1 addition & 1 deletion buoy_description/models/mbari_wec_base/model.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<model>
<name>MBARI_WEC</name>
<name>MBARI_WEC_BASE</name>
<version>1.0</version>
<sdf version="1.8">model.sdf</sdf>

Expand Down
2 changes: 1 addition & 1 deletion buoy_description/models/mbari_wec_ros/model.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<model>
<name>MBARI_WEC</name>
<name>MBARI_WEC_ROS</name>
<version>1.0</version>
<sdf version="1.8">model.sdf</sdf>

Expand Down
42 changes: 21 additions & 21 deletions buoy_description/models/mbari_wec_ros/model.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -36,27 +36,27 @@
<publish_rate>10</publish_rate>
</plugin>

<plugin
filename="ignition-gazebo-joint-state-publisher-system"
name="ignition::gazebo::systems::JointStatePublisher">
</plugin>

<plugin
filename="ignition-gazebo-pose-publisher-system"
name="ignition::gazebo::systems::PosePublisher">
<publish_link_pose>true</publish_link_pose>
<use_pose_vector_msg>true</use_pose_vector_msg>
<static_publisher>true</static_publisher>
<static_update_frequency>1</static_update_frequency>
</plugin>

<plugin
filename="ignition-gazebo-odometry-publisher-system"
name="ignition::gazebo::systems::OdometryPublisher">
<dimensions>3</dimensions>
<odom_frame>MBARI_WEC_ROS/odom</odom_frame>
<robot_base_frame>MBARI_WEC_ROS</robot_base_frame>
</plugin>
<plugin
filename="ignition-gazebo-joint-state-publisher-system"
name="ignition::gazebo::systems::JointStatePublisher">
</plugin>

<plugin
filename="ignition-gazebo-pose-publisher-system"
name="ignition::gazebo::systems::PosePublisher">
<publish_link_pose>true</publish_link_pose>
<use_pose_vector_msg>true</use_pose_vector_msg>
<static_publisher>true</static_publisher>
<static_update_frequency>1</static_update_frequency>
</plugin>

<plugin
filename="ignition-gazebo-odometry-publisher-system"
name="ignition::gazebo::systems::OdometryPublisher">
<dimensions>3</dimensions>
<odom_frame>MBARI_WEC_ROS/odom</odom_frame>
<robot_base_frame>MBARI_WEC_ROS</robot_base_frame>
</plugin>

</model>
</sdf>
3 changes: 2 additions & 1 deletion buoy_gazebo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ else()
endif()

find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(buoy_msgs REQUIRED)
find_package(buoy_description REQUIRED)
quarkytale marked this conversation as resolved.
Show resolved Hide resolved
find_package(rclcpp REQUIRED)

find_package(ignition-cmake2 REQUIRED)
find_package(ignition-plugin1 REQUIRED COMPONENTS register)
Expand Down
2 changes: 1 addition & 1 deletion buoy_gazebo/worlds/buoy_no_plugins.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<include>
<pose>0 0 0 0 0 0</pose>
<uri>buoy</uri>
<uri>package://buoy_description/models/mbari_wec_base</uri>
</include>

</world>
Expand Down