Skip to content

Commit

Permalink
Update GitHub artifacts action to v4 (#1014)
Browse files Browse the repository at this point in the history
* Update artifacts

* fix controller manager (wip)

* format

* fix

* fix

* fix

* disable automatic controller sync

* format

* format

* format

* format

---------

Co-authored-by: Darko Lukic <lukicdarkoo@gmail.com>
  • Loading branch information
MNikoliCC and lukicdarkoo authored Dec 21, 2024
1 parent 99762e0 commit 4f63238
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 9 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/sync_master_to_develop.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Branch synchronizer

on:
schedule:
- cron: '0 04 * * *'
workflow_dispatch:

# schedule:
# - cron: '0 04 * * *'

jobs:
sync-develop-with-master:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
ROS_DISTRO: ${{matrix.ROS_DISTRO}}
- name: Upload Artifact
if: ${{ failure() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: generic_artifacts_${{matrix.ROS_REPO}}_${{matrix.ROS_DISTRO}}
path: /artifacts
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
ROS_DISTRO: ${{matrix.ROS_DISTRO}}
- name: Upload Artifact
if: ${{ failure() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: generic_artifacts_develop_${{matrix.ROS_REPO}}_${{matrix.ROS_DISTRO}}
path: /artifacts
Expand Down
6 changes: 5 additions & 1 deletion webots_ros2_control/src/Ros2Control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,11 @@ namespace webots_ros2_control {

// Controller Manager
mExecutor = std::make_shared<rclcpp::executors::MultiThreadedExecutor>();
mControllerManager.reset(new controller_manager::ControllerManager(std::move(resourceManager), mExecutor));

rclcpp::NodeOptions options = controller_manager::get_cm_node_options();
options.arguments(node->get_node_options().arguments());
mControllerManager.reset(new controller_manager::ControllerManager(std::move(resourceManager), mExecutor,
"controller_manager", node->get_namespace(), options));

// Update rate
const int updateRate = mControllerManager->get_parameter("update_rate").as_int();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace webots_ros2_driver {

class WebotsNode : public rclcpp::Node {
public:
WebotsNode(std::string name);
WebotsNode(std::string name, rclcpp::NodeOptions &options);
void init();
int step();
std::string urdf() const { return mRobotDescription; };
Expand Down
5 changes: 4 additions & 1 deletion webots_ros2_driver/src/Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ int main(int argc, char **argv) {
for (char notAllowedChar : " -.)(")
std::replace(robotName.begin(), robotName.end(), notAllowedChar, '_');

std::shared_ptr<webots_ros2_driver::WebotsNode> node = std::make_shared<webots_ros2_driver::WebotsNode>(robotName);
rclcpp::NodeOptions nodeOptions;
nodeOptions.arguments(std::vector<std::string>(argv + 1, argv + argc));
std::shared_ptr<webots_ros2_driver::WebotsNode> node =
std::make_shared<webots_ros2_driver::WebotsNode>(robotName, nodeOptions);
node->init();

// The parent process must be ros2 run. Declaring from launch file is deprecated. Remove with 2024.0.0.
Expand Down
4 changes: 3 additions & 1 deletion webots_ros2_driver/src/WebotsNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ namespace webots_ros2_driver {
gShutdownSignalReceived = true;
}

WebotsNode::WebotsNode(std::string name) : Node(name), mPluginLoader(gPluginInterfaceName, gPluginInterface) {
WebotsNode::WebotsNode(std::string name, rclcpp::NodeOptions &options) :
Node(name, options),
mPluginLoader(gPluginInterfaceName, gPluginInterface) {
mRobotDescriptionParam = this->declare_parameter<std::string>("robot_description", "");
mSetRobotStatePublisher = this->declare_parameter<bool>("set_robot_state_publisher", false);
if (mRobotDescriptionParam != "") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@ abb/abb_joint_trajectory_controller:
- position

allow_partial_joints_goal: true

0 comments on commit 4f63238

Please sign in to comment.