Skip to content

Commit

Permalink
🔨 Implemented dynamic dirty launch time flag to circumvent rigid ROS …
Browse files Browse the repository at this point in the history
…2 launch barriers. Allow for intra-process to run more dynamically and user-friendliness.

Signed-off-by: Bey Hao Yun <[email protected]>
  • Loading branch information
cardboardcode committed Mar 10, 2024
1 parent 52d8fe5 commit c37a6e3
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/virtual_camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// limitations under the License.

#include <memory>
#include "rclcpp/rclcpp.hpp"
#include "virtual_camera/virtual_camera.hpp"
#include "virtual_camera/image_viewer.hpp"

Expand All @@ -35,7 +36,18 @@ int main(int argc, char * argv[])
auto image_view_node = std::make_shared<ImageViewer>();

executor.add_node(vcamera_node);
executor.add_node(image_view_node);

std::string use_image_viewer = "false";
if (argc == 1){
use_image_viewer = "false";
}
else{
use_image_viewer = argv[1];
}

if (use_image_viewer == "true"){
executor.add_node(image_view_node);
}

executor.spin();

Expand Down

0 comments on commit c37a6e3

Please sign in to comment.