Skip to content

Commit 6528e35

Browse files
committed
use only Twist not TwistStamped
- This removes the TwistStamped. The Stamp information was unused. - This makes it easier to use with teleop_twist_joy - In the future we plan to add a TwistStamped version which can be configured Signed-off-by: Alex Moriarty <[email protected]>
1 parent 6e44992 commit 6528e35

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Controller Manager (`ros2_control`) will try to activate both on request, but th
2424
ros2 control switch_controllers --activate streaming_controller --deactivate joint_trajectory_controller
2525
```
2626

27-
By publishing `geometry_msgs::msg::TwistStamped` to `/streaming_controller/commands`, the commands will be piped to the driver
27+
By publishing `geometry_msgs::msg::Twist` to `/streaming_controller/commands`, the commands will be piped to the driver
2828
and streamed to the robot controller.
2929

3030
## PicknikResetFaultController

picknik_twist_controller/include/picknik_twist_controller/picknik_twist_controller.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@
2929
#include <vector>
3030

3131
#include "controller_interface/controller_interface.hpp"
32-
#include "geometry_msgs/msg/twist_stamped.hpp"
32+
#include "geometry_msgs/msg/twist.hpp"
3333
#include "picknik_twist_controller/visibility_control.h"
3434
#include "realtime_tools/realtime_buffer.h"
3535

3636
namespace picknik_twist_controller
3737
{
38-
using CmdType = geometry_msgs::msg::TwistStamped;
38+
using CmdType = geometry_msgs::msg::Twist;
3939
using CallbackReturn = rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn;
4040

4141
class PicknikTwistController : public controller_interface::ControllerInterface

picknik_twist_controller/src/picknik_twist_controller.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,12 @@ controller_interface::return_type PicknikTwistController::update(
145145
command_interfaces_.size());
146146
return controller_interface::return_type::ERROR;
147147
}
148-
command_interfaces_[0].set_value((*twist_commands)->twist.linear.x);
149-
command_interfaces_[1].set_value((*twist_commands)->twist.linear.y);
150-
command_interfaces_[2].set_value((*twist_commands)->twist.linear.z);
151-
command_interfaces_[3].set_value((*twist_commands)->twist.angular.x);
152-
command_interfaces_[4].set_value((*twist_commands)->twist.angular.y);
153-
command_interfaces_[5].set_value((*twist_commands)->twist.angular.z);
148+
command_interfaces_[0].set_value((*twist_commands)->linear.x);
149+
command_interfaces_[1].set_value((*twist_commands)->linear.y);
150+
command_interfaces_[2].set_value((*twist_commands)->linear.z);
151+
command_interfaces_[3].set_value((*twist_commands)->angular.x);
152+
command_interfaces_[4].set_value((*twist_commands)->angular.y);
153+
command_interfaces_[5].set_value((*twist_commands)->angular.z);
154154

155155
return controller_interface::return_type::OK;
156156
}

0 commit comments

Comments
 (0)