Skip to content

Commit

Permalink
🔨 Fixes for failing CI.
Browse files Browse the repository at this point in the history
Signed-off-by: Bey Hao Yun <[email protected]>
  • Loading branch information
cardboardcode committed Mar 11, 2024
1 parent ae71c93 commit 067fbc3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 0 additions & 1 deletion launch/showimageraw.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.substitutions import LaunchConfiguration
Expand Down
9 changes: 6 additions & 3 deletions src/virtual_camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,19 @@ int main(int argc, char * argv[])
// Declare a boolean parameter
vcamera_node->declare_parameter("use_image_viewer", false);

// Get the boolean parameter value to determine if the image_view_node should be activated.
// Get the boolean parameter value to determine
// if the image_view_node should be activated.
bool imageviewer_flag = vcamera_node->get_parameter("use_image_viewer").as_bool();
RCLCPP_INFO(vcamera_node->get_logger(), "use_image_viewer set to: [%s]", imageviewer_flag ? "true" : "false");
RCLCPP_INFO(
vcamera_node->get_logger(), "use_image_viewer set to: [%s]",
imageviewer_flag ? "true" : "false");

// Instantiate ImageViewer ROS 2 node.
auto image_view_node = std::make_shared<ImageViewer>();
// Add VirtualCamera ROS 2 node to intra-process executor
executor.add_node(vcamera_node);

// If use_image_viewer ROS 2 parameter is set to true at launch time,
// If use_image_viewer ROS 2 parameter is set to true,
// add ImageViewer ROS 2 node to intra-process executor.
if (imageviewer_flag) {
executor.add_node(image_view_node);
Expand Down

0 comments on commit 067fbc3

Please sign in to comment.