53 #include <geometry_msgs/WrenchStamped.h> 58 #define PRG_VER "Ver 1.0.0" 93 int main(
int argc,
char** argv)
101 ROS_WARN(
"Port is not defined, trying /dev/ttyUSB0");
107 ROS_WARN(
"Rate is not defined, using maximum 1.2 kHz");
112 std::string frame_id =
"leptrino";
113 nh_private.
getParam(
"frame_id", frame_id);
115 int i, l = 0, rt = 0;
169 for (
int i = 0; i <
FN_Num; i++)
207 ROS_INFO(
"Time test: read %d in %6.3f sec: %6.3f kHz", dt_count, dt_sum, (dt_count / dt_sum) * 0.001);
219 ROS_DEBUG_THROTTLE(0.1,
"%d,%d,%d,%d,%d,%d", stForce->
ssForce[0], stForce->
ssForce[1], stForce->
ssForce[2],
222 geometry_msgs::WrenchStampedPtr msg(
new geometry_msgs::WrenchStamped);
224 msg->header.frame_id = frame_id;
276 printf(
"Application close\n");
307 for (usCnt = 0; usCnt < usSize; usCnt++)
309 ucWork = pucInput[usCnt];
382 printf(
"Stop sensor\n");
void publish(const boost::shared_ptr< M > &message) const
#define ROS_DEBUG_THROTTLE(rate,...)
int main(int argc, char **argv)
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
double conversion_factor[FN_Num]
SCHAR scSerial[SERIAL_SIZE]
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
void GetProductInfo(void)
ULONG SendData(UCHAR *pucInput, USHORT usSize)
int Comm_Open(const char *dev)
int Comm_GetRcvData(UCHAR *buff)
struct ST_SystemInfo SystemInfo
bool getParam(const std::string &key, std::string &s) const
int Comm_SendData(UCHAR *buff, int l)
SCHAR scPName[P_NAME_SIZE]
ROSCPP_DECL void spinOnce()
void Comm_Setup(long baud, int parity, int bitlen, int rts, int dtr, char code)