6#define _USE_MATH_DEFINES
20using std::placeholders::_1;
34 m_ros2_subscriber = m_node->create_subscription<geometry_msgs::msg::Twist>(
m_topic_name,
36 std::bind(&MobileBaseVelocityControl_nws_ros2::twist_callback,
this, _1));
38 if (!m_ros2_subscriber)
52void MobileBaseVelocityControl_nws_ros2::twist_callback(
const geometry_msgs::msg::Twist::SharedPtr msg)
56 msg->angular.z * 180 /
M_PI);
70 driver->
view(m_iNavVel);
73 if (
nullptr == m_iNavVel)
bool parseParams(const yarp::os::Searchable &config) override
Parse the DeviceDriver parameters.
bool close() override
Close the DeviceDriver.
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
bool detach() override
Detach the object (you must have first called attach).
bool attach(yarp::dev::PolyDriver *driver) override
Attach to another object.
static rclcpp::Node::SharedPtr createNode(std::string name)
bool view(T *&x)
Get an interface to the device driver.
virtual yarp::dev::ReturnValue applyVelocityCommand(double x_vel, double y_vel, double theta_vel, double timeout=0.1)=0
Apply a velocity command.
A container for a device driver.
bool isValid() const
Check if device is valid.
A mini-server for performing network communication in the background.
A base class for nested structures that can be searched.
bool start()
Start the new thread running.
#define yCInfo(component,...)
#define yCError(component,...)
#define YARP_LOG_COMPONENT(name,...)
For streams capable of holding different kinds of content, check what they actually have.
An interface to the operating system, including Port based communication.