Skip to content

Commit

Permalink
refactored waypoint_flier to example_waypoint_flier to be consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
matemat13 committed Dec 5, 2023
1 parent d4bbec9 commit 04d6c38
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 76 deletions.
10 changes: 5 additions & 5 deletions cpp/waypoint_flier/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ SET(CATKIN_DEPENDENCIES
)

SET(LIBRARIES
WaypointFlier
ExampleWaypointFlier
)

find_package(catkin REQUIRED COMPONENTS
Expand Down Expand Up @@ -43,17 +43,17 @@ include_directories(
)

## Declare a C++ library
add_library(WaypointFlier
src/waypoint_flier.cpp
add_library(ExampleWaypointFlier
src/example_waypoint_flier.cpp
)

## Add configure headers for dynamic reconfigure
add_dependencies(WaypointFlier
add_dependencies(ExampleWaypointFlier
${PROJECT_NAME}_gencfg
)

## Specify libraries to link a library or executable target against
target_link_libraries(WaypointFlier
target_link_libraries(ExampleWaypointFlier
${catkin_LIBRARIES}
${Eigen_LIBRARIES}
)
Expand Down
4 changes: 2 additions & 2 deletions cpp/waypoint_flier/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# WaypointFlier ROS example
# ExampleWaypointFlier ROS example

This package was created as an example of how to write ROS nodelets.
The package is written in C++ and features custom MRS libraries and msgs.
Expand Down Expand Up @@ -58,7 +58,7 @@ Also check out our general [C++ good/bad coding practices tutorial](https://ctu-
- `sub_odom_uav_` - member subscriber to uav odometry msg type
- `pub_reference_` - member publisher of reference msg type
- `srv_server_start_waypoints_following_` - member service server for starting following of waypoints
- `WaypointFlier::callbackTimerCheckSubscribers()` - callback of timer which checks subscribers
- `ExampleWaypointFlier::callbackTimerCheckSubscribers()` - callback of timer which checks subscribers
- `mutex_odom_uav_` - mutex locking access to variable containing odometry of the UAV

### Good practices
Expand Down
2 changes: 1 addition & 1 deletion cpp/waypoint_flier/config/dynparam.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ roslib.load_manifest(PACKAGE)
from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator();
params = gen.add_group("waypoint_flier parameters");
params = gen.add_group("example_waypoint_flier parameters");

params.add("waypoint_idle_time", double_t, 1, "The time to wait before flying to the next waypoint", 1, 0, 60);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@

<!-- will it run as standalone nodelet or using a nodelet manager? -->
<arg name="standalone" default="true" />
<arg name="manager" default="$(arg UAV_NAME)_waypointflier_manager" />
<arg name="manager" default="$(arg UAV_NAME)_example_waypoint_flier_manager" />
<arg unless="$(arg standalone)" name="nodelet" value="load"/>
<arg if="$(arg standalone)" name="nodelet" value="standalone"/>
<arg unless="$(arg standalone)" name="nodelet_manager" value="$(arg manager)"/>
<arg if="$(arg standalone)" name="nodelet_manager" value=""/>

<!-- Namespace - all topics, services and parameters will be remapped using this namespace as a prefix (eg.: "/waypoint_flier/odom_uav_in" to "/uav1/waypoint_flier/odom_uav_in") -->
<!-- Namespace - all topics, services and parameters will be remapped using this namespace as a prefix (eg.: "/example_waypoint_flier/odom_uav_in" to "/uav1/example_waypoint_flier/odom_uav_in") -->
<group ns="$(arg UAV_NAME)">

<!-- WaypointFlier nodelet -->
<node pkg="nodelet" type="nodelet" name="waypoint_flier" args="$(arg nodelet) example_waypoint_flier/WaypointFlier $(arg nodelet_manager)" launch-prefix="$(arg launch_prefix_debug)" output="screen">
<!-- ExampleWaypointFlier nodelet -->
<node pkg="nodelet" type="nodelet" name="example_waypoint_flier" args="$(arg nodelet) example_waypoint_flier/ExampleWaypointFlier $(arg nodelet_manager)" launch-prefix="$(arg launch_prefix_debug)" output="screen">

<!-- Parameters loaded from launch file -->
<param name="uav_name" value="$(arg UAV_NAME)" />

<!-- ROS parameters config file -->
<rosparam file="$(find example_waypoint_flier)/config/waypoint_flier.yaml" />
<rosparam file="$(find example_waypoint_flier)/config/example_waypoint_flier.yaml" />

<!-- Subscribers (note that the topic names will also be remapped using the namespace as a prefix) -->
<remap from="~odom_uav_in" to="estimation_manager/odom_main" />
Expand Down
6 changes: 3 additions & 3 deletions cpp/waypoint_flier/nodelets.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library path="lib/libWaypointFlier">
<class name="example_waypoint_flier/WaypointFlier" type="example_waypoint_flier::WaypointFlier" base_class_type="nodelet::Nodelet">
<description>WaypointFlier nodelet</description>
<library path="lib/libExampleWaypointFlier">
<class name="example_waypoint_flier/ExampleWaypointFlier" type="example_waypoint_flier::ExampleWaypointFlier" base_class_type="nodelet::Nodelet">
<description>ExampleWaypointFlier nodelet</description>
</class>
</library>
Loading

0 comments on commit 04d6c38

Please sign in to comment.