46 gazebo::client::shutdown();
58 if (_msg->contact_size() > 0)
71 if (_msg->contact_size() > 0)
84 if (_msg->contact_size() > 0)
97 if (_msg->contact_size() > 0)
110 ros::Rate publish_rate(200);
113 std_msgs::Int8MultiArray contacts_msg;
115 contacts_msg.data.resize(4);
117 for (
size_t i = 0; i < 4; i++)
124 publish_rate.sleep();
131 gazebo::client::setup();
133 this->
gazeboNode.reset(
new gazebo::transport::Node());
157 if (!ros::isInitialized())
164 "contact_sensor_node",
165 ros::init_options::NoSigintHandler
169 this->
rosNode.reset(
new ros::NodeHandle(
"contact_sensor_node"));
171 ros::AdvertiseOptions contact_state_ao =
172 ros::AdvertiseOptions::create<std_msgs::Int8MultiArray>(
173 "/my_robot/contact_state",
175 ros::SubscriberStatusCallback(),
176 ros::SubscriberStatusCallback(),
193 int main(
int _argc,
char **_argv)