37 #include <sensor_msgs/JointState.h> 41 int main(
int argc,
char* argv[] )
43 ros::init(argc, argv,
"state_publisher" );
52 geometry_msgs::TransformStamped odom_trans;
53 sensor_msgs::JointState joint_state;
60 joint_state.name.resize(4);
61 joint_state.position.resize(4);
63 joint_state.name[0] =
"p3at_back_right_wheel_joint";
64 joint_state.position[0] = 0;
66 joint_state.name[1] =
"p3at_back_left_wheel_joint";
67 joint_state.position[1] = 0;
69 joint_state.name[2] =
"p3at_front_left_wheel_joint";
70 joint_state.position[2] = 0;
72 joint_state.name[3] =
"p3at_front_right_wheel_joint";
73 joint_state.position[3] = 0;
77 joint_state_publisher.
publish(joint_state);
void publish(const boost::shared_ptr< M > &message) const
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
int main(int argc, char *argv[])