Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor updates to examples #400

Merged
merged 3 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions gz_ros2_control_demos/examples/example_gripper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@

#include "std_msgs/msg/float64_multi_array.hpp"

std::shared_ptr<rclcpp::Node> node;

int main(int argc, char * argv[])
{
rclcpp::init(argc, argv);

node = std::make_shared<rclcpp::Node>("gripper_test_node");
std::shared_ptr<rclcpp::Node> node = std::make_shared<rclcpp::Node>("gripper_test_node");

auto publisher = node->create_publisher<std_msgs::msg::Float64MultiArray>(
"/gripper_controller/commands", 10);
Expand Down
4 changes: 2 additions & 2 deletions gz_ros2_control_demos/examples/example_position.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ int main(int argc, char * argv[])
node.reset();
return 1;
}
RCLCPP_ERROR(node->get_logger(), "send goal call ok :)");
RCLCPP_INFO(node->get_logger(), "send goal call ok :)");

rclcpp_action::ClientGoalHandle<control_msgs::action::FollowJointTrajectory>::SharedPtr
goal_handle = goal_handle_future.get();
Expand All @@ -164,7 +164,7 @@ int main(int argc, char * argv[])
node.reset();
return 1;
}
RCLCPP_ERROR(node->get_logger(), "Goal was accepted by server");
RCLCPP_INFO(node->get_logger(), "Goal was accepted by server");

// Wait for the server to be done with the goal
auto result_future = action_client->async_get_result(goal_handle);
Expand Down
30 changes: 16 additions & 14 deletions gz_ros2_control_demos/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,33 @@
<build_depend>std_msgs</build_depend>

<exec_depend>ament_index_python</exec_depend>
<exec_depend>control_msgs</exec_depend>
<exec_depend>effort_controllers</exec_depend>
<exec_depend>geometry_msgs</exec_depend>
<exec_depend>hardware_interface</exec_depend>
<exec_depend>gz_ros2_control</exec_depend>
<exec_depend>ros_gz_bridge</exec_depend>
<exec_depend>imu_sensor_broadcaster</exec_depend>
<exec_depend>joint_state_broadcaster</exec_depend>
<exec_depend>joint_trajectory_controller</exec_depend>
<exec_depend>launch</exec_depend>
<exec_depend>launch_ros</exec_depend>
<exec_depend>ros2launch</exec_depend>
<exec_depend>launch</exec_depend>
<exec_depend>rclcpp</exec_depend>
<exec_depend>robot_state_publisher</exec_depend>
<exec_depend>ros_gz_bridge</exec_depend>
<exec_depend condition="$GZ_VERSION == ''">ros_gz_sim</exec_depend>
<exec_depend condition="$GZ_VERSION == 'harmonic'">ros_gz_sim</exec_depend>
<exec_depend condition="$GZ_VERSION == 'garden'">ros_gz_sim</exec_depend>
<exec_depend condition="$GZ_VERSION == 'fortress'">ros_ign_gazebo</exec_depend>
<exec_depend>ros2controlcli</exec_depend>
<exec_depend>ros2launch</exec_depend>
<exec_depend>std_msgs</exec_depend>
<exec_depend>velocity_controllers</exec_depend>
<exec_depend>xacro</exec_depend>

<!-- ros2_control -->
<exec_depend>ackermann_steering_controller</exec_depend>
<exec_depend>control_msgs</exec_depend>
<exec_depend>diff_drive_controller</exec_depend>
<exec_depend>effort_controllers</exec_depend>
<exec_depend>gz_ros2_control</exec_depend>
<exec_depend>hardware_interface</exec_depend>
<exec_depend>imu_sensor_broadcaster</exec_depend>
<exec_depend>joint_state_broadcaster</exec_depend>
<exec_depend>joint_trajectory_controller</exec_depend>
<exec_depend>ros2controlcli</exec_depend>
<exec_depend>tricycle_controller</exec_depend>
<exec_depend>ackermann_steering_controller</exec_depend>
<exec_depend>xacro</exec_depend>
<exec_depend>velocity_controllers</exec_depend>

<test_depend>ament_cmake_gtest</test_depend>
<test_depend>ament_lint_auto</test_depend>
Expand Down
Loading