本文整理汇总了C++中Interpolator::addLine方法的典型用法代码示例。如果您正苦于以下问题:C++ Interpolator::addLine方法的具体用法?C++ Interpolator::addLine怎么用?C++ Interpolator::addLine使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Interpolator
的用法示例。
在下文中一共展示了Interpolator::addLine方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char* argv[])
{
int ret = libusb_init(0);
if (ret)
{
ROS_ERROR_STREAM("Cannot initialize libusb, error: " << ret);
return 1;
}
ros::init(argc, argv, "kinect_aux");
ros::NodeHandle n;
deltaFilter.type = Filter::Filter_Median;
deltaFilter.bufferLength = 300;
deltaFilter.mediansLength = 5;
for(int i=0; i < 3; i++){
Interpolator* interp = &interpolators[i];
Point2d start(axes[i][0], -1.0);
Point2d zero(axes[i][1], 0.0);
Point2d end(axes[i][2], 1.0);
interp->addLine( start, zero );
interp->addLine( zero, end );
}
int deviceIndex;
n.param<int>("device_index", deviceIndex, 0);
openAuxDevice(deviceIndex);
if (!dev)
{
ROS_ERROR_STREAM("No valid aux device found");
libusb_exit(0);
return 2;
}
pub_imu = n.advertise<sensor_msgs::Imu>("imu", 15);
pub_tilt_angle = n.advertise<std_msgs::Float64>("cur_tilt_angle", 15);
pub_tilt_status = n.advertise<std_msgs::UInt8>("cur_tilt_status", 15);
sub_tilt_angle = n.subscribe("tilt_angle", 1, setTiltAngle);
sub_led_option = n.subscribe("led_option", 1, setLedOption);
sub_axis_selector = n.subscribe("/imu/debug/axis_selector", 1, setAxisSelectorCallback);
sub_axis_min = n.subscribe("/imu/debug/axis_min", 1, setAxisMinCallback);
sub_axis_zero = n.subscribe("/imu/debug/axis_zero", 1, setAxisZeroCallback);
sub_axis_max = n.subscribe("/imu/debug/axis_max", 1, setAxisMaxCallback);
while (ros::ok())
{
ros::spinOnce();
publishState();
}
libusb_exit(0);
return 0;
}