3 #ifndef ROBOWFLEX_IO_ROBOTBROADCASTER_
4 #define ROBOWFLEX_IO_ROBOTBROADCASTER_
10 #include <tf2_ros/transform_broadcaster.h>
72 tf2_ros::TransformBroadcaster
tf2br_;
#define ROBOWFLEX_CLASS_FORWARD(C)
Macro that forward declares a class and defines two shared ptrs types:
Helper class to broadcast transform information on TF and joint states.
RobotConstPtr robot_
Robot being published.
bool active_
Is thread active?
std::unique_ptr< std::thread > thread_
Worker thread.
void addStaticTransform(const std::string &name, const std::string &base, const std::string &target, const RobotPose &tf=RobotPose::Identity())
Add a new static transform to the broadcaster.
RobotBroadcaster(const RobotConstPtr &robot, const std::string &base_frame="world", const std::string &name="robowflex")
Constructor. Sets up TF2 broadcaster.
ros::NodeHandle nh_
Handle for publishing.
unsigned int rate_
Times per second to send out.
void stop()
Stop publishing TF and joint information.
std::map< std::string, StaticTransform > static_
Static transforms.
void start()
Begin publishing TF and joint information.
ros::Publisher state_pub_
State publisher.
void update()
Send out the TF and joint information.
~RobotBroadcaster()
Destructor.
const std::string base_
Base frame to use.
tf2_ros::TransformBroadcaster tf2br_
TF2 broadcaster.
bool done_
Is thread done?
void removeStaticTransform(const std::string &name)
Remove a named static transform.
A const shared pointer wrapper for robowflex::Robot.
Functions for loading and animating robots in Blender.
Main namespace. Contains all library classes and functions.
std::decay< decltype(std::declval< moveit::core::Transforms >().getTransform("")) >::type RobotPose
A pose (point in SE(3)) used in various functions. Defined from what MoveIt! uses.