void BoxDetectionNode::loadParameters()
{
    ros::NodeHandle private_nh("~");
#define GOP(key, default_value) getOptionalParameter(private_nh, #key, parameters_.key##_, default_value)
#define GRP(key) getRequiredParameter(private_nh, #key, parameters_.key##_)
    GOP(point_cloud_topic, std::string("/camera/depth/points"));
    GOP(target_frame_id, std::string("base_link"));
    GOP(have_action_server_debug_output, true);
    GOP(have_box_detection_debug_output, true);

    GOP(box_plane_points_min, 100);
    GRP(box_plane_size_min);
    GRP(box_plane_size_max);
    GOP(detection_timeout, 30.0);
    GOP(plane_fitting_distance_threshold, 0.02);
    GOP(plane_fitting_max_iterations, 50);
    GOP(downsampling_leaf_size, 0.005);
    GOP(clusterization_tolerance, 0.02);

    GOP(have_plane_publisher, true);
    GOP(plane_publishing_rate, 2.0);

    GOP(have_collision_object_publisher, true);
    GOP(collision_objects_basename, std::string("box"));

    GOP(have_visualization_marker_publisher, true);
    GOP(visualization_marker_namespace, std::string("tedusar_box_detection"));
#undef GOP
#undef GRP
}
Esempio n. 2
0
	int drvup_mask;
};

#define	GRP(r, nm, dn_s, dn_w, up_s, up_w)				\
{									\
	.name = #nm,							\
	.reg = r - 0x868,						\
	.drvdn_shift = dn_s,						\
	.drvdn_mask = (1 << dn_w) - 1,					\
	.drvup_shift = up_s,						\
	.drvup_mask = (1 << dn_w) - 1,					\
}

/* Use register offsets from TRM */
static const struct tegra_grp pin_grp_tbl[] = {
	GRP(0x868, ao1,          12,  5,  20,  5),
	GRP(0x86C, ao2,          12,  5,  20,  5),
	GRP(0x870, at1,          12,  7,  20,  7),
	GRP(0x874, at2,          12,  7,  20,  7),
	GRP(0x878, at3,          12,  7,  20,  7),
	GRP(0x87C, at4,          12,  7,  20,  7),
	GRP(0x880, at5,          14,  5,  19,  5),
	GRP(0x884, cdev1,        12,  5,  20,  5),
	GRP(0x888, cdev2,        12,  5,  20,  5),
	GRP(0x890, dap1,         12,  5,  20,  5),
	GRP(0x894, dap2,         12,  5,  20,  5),
	GRP(0x898, dap3,         12,  5,  20,  5),
	GRP(0x89C, dap4,         12,  5,  20,  5),
	GRP(0x8A0, dbg,          12,  5,  20,  5),
	GRP(0x8B0, sdio3,        12,  7,  20,  7),
	GRP(0x8B4, spi,          12,  5,  20,  5),