diff --git a/.github/workflows/ros2_build_and_tag.yml b/.github/workflows/ros2_build_and_tag.yml index 6beea9b..ef8b034 100644 --- a/.github/workflows/ros2_build_and_tag.yml +++ b/.github/workflows/ros2_build_and_tag.yml @@ -46,7 +46,7 @@ env: apt-get install -y python3-ipython dpkg -i fcat/.github/python3-cogapp_3.3.0-3_all.deb cp fcat/.github/cog /usr/local/bin/ - git clone --depth 1 --branch update-msgs https://github.com/nasa-jpl/fcat_msgs.git + git clone --depth 1 --branch v0.10.0 https://github.com/nasa-jpl/fcat_msgs.git jobs: # ============================================================================ diff --git a/CMakeLists.txt b/CMakeLists.txt index 64b9d3a..1aa3b84 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,7 +23,7 @@ endif() include(FetchContent) FetchContent_Declare(fastcat GIT_REPOSITORY https://github.com/nasa-jpl/fastcat.git - GIT_TAG v0.13.13 + GIT_TAG v0.13.15 ) FetchContent_MakeAvailable(fastcat) diff --git a/README.md b/README.md index 31bb4d7..3103d17 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ An optional ROS2 node called `fcat_srvs` is provided in this package. The purpos ## Quickstart -Due to a potential issue in the default RMW implementation, the cyclone vendor is recommended for use as of the Feb 2021 ROS2 Foxy release. +Due to a potential issue in the default RMW implementation, the cyclone vendor is recommended for use: ``` bash sudo apt install ros-${ROS_DISTRO}-rmw-cyclonedds-cpp diff --git a/src/fcat.cpp b/src/fcat.cpp index ffeb214..1e33c3c 100644 --- a/src/fcat.cpp +++ b/src/fcat.cpp @@ -48,7 +48,7 @@ Fcat::Fcat(const rclcpp::NodeOptions& options) RCLCPP_INFO(this->get_logger(), "loading Yaml from %s", fastcat_config_path.c_str()); YAML::Node node = YAML::LoadFile(fastcat_config_path); - if (!fcat_manager_.ConfigFromYaml(node)) { + if (!fcat_manager_.CreateConfigFromYaml(node)) { throw std::invalid_argument("Fastcat Manager failed to process bus configuration YAML file."); } @@ -240,7 +240,11 @@ Fcat::Fcat(const rclcpp::NodeOptions& options) loop_period_sec_ = 1.0 / fcat_manager_.GetTargetLoopRate(); last_time_ = this->now().seconds(); module_state_msg_.faulted = false; - + + if (!fcat_manager_.InitHardware()) { + throw std::invalid_argument("Fastcat Manager failed to initialize EtherCAT hardware."); + } + fcat_state_ = FcatState::INACTIVE; StartProcessTimer(); fcat_state_ = FcatState::ACTIVE;