Go to the documentation of this file.
18 #ifndef PILZ_TESTUTILS_JOINT_STATE_PUBLISHER_MOCK_H
19 #define PILZ_TESTUTILS_JOINT_STATE_PUBLISHER_MOCK_H
29 #include <sensor_msgs/JointState.h>
~JointStatePublisherMock()
JointStatePublisherMock & operator=(const JointStatePublisherMock &other)=delete
ros::Time next_time_stamp_
sensor_msgs::JointStateConstPtr JointStateConstPtr
std::atomic_bool stop_flag_
std::atomic_bool go_home_flag_
Mocks the joint_states interface. Can simulate robot movement by changing the position of the first j...
void updateJoint1Position()
JointStateConstPtr getNextMessage()
Return the message which will be published next.
sensor_msgs::JointState JointState
std::vector< std::string > joint_names_
std::mutex next_msg_mutex_
JointStatePublisherMock()
void setJoint1Velocity(const double &vel)
std::thread publisher_thread_
void goHome()
Go back to home position (position=velocity=0.0).
void startPublishingAsync(const double &joint1_start_position=0.0)