43 void pf_draw_statistics(
pf_t *pf, rtk_fig_t *fig);
55 max_samples = MIN(max_samples,
set->sample_count);
57 for (i = 0; i < max_samples; i++)
59 sample =
set->samples + i;
61 px = sample->
pose.
v[0];
62 py = sample->
pose.
v[1];
63 pa = sample->
pose.
v[2];
67 rtk_fig_point(fig, px, py);
68 rtk_fig_arrow(fig, px, py, pa, 0.1, 0.02);
83 rtk_fig_color(fig, 0.0, 0.0, 1.0);
84 pf_kdtree_draw(
set->kdtree, fig);
99 rtk_fig_color(fig, 0, 0, 1);
100 rtk_fig_ellipse(fig, mean.
v[0], mean.
v[1], mean.
v[2], 3 * var, 3 * var, 0);
115 double weight, o, d1, d2;
119 for (i = 0; i <
set->cluster_count; i++)
121 cluster =
set->clusters + i;
124 mean = cluster->
mean;
142 o = atan2(r.
m[1][0], r.
m[0][0]);
143 d1 = 6 * sqrt(d.
m[0][0]);
144 d2 = 6 * sqrt(d.
m[1][1]);
146 if (d1 > 1e-3 && d2 > 1e-3)
149 rtk_fig_ellipse(fig, mean.
v[0], mean.
v[1], o, d1, d2, 0);
150 rtk_fig_line_ex(fig, mean.
v[0], mean.
v[1], o, d1);
151 rtk_fig_line_ex(fig, mean.
v[0], mean.
v[1], o + M_PI / 2, d2);
155 rtk_fig_arrow(fig, mean.
v[0], mean.
v[1], mean.
v[2], 0.50, 0.10);
156 rtk_fig_arrow(fig, mean.
v[0], mean.
v[1], mean.
v[2] + 3 * sqrt(cov.
m[2][2]), 0.50, 0.10);
157 rtk_fig_arrow(fig, mean.
v[0], mean.
v[1], mean.
v[2] - 3 * sqrt(cov.
m[2][2]), 0.50, 0.10);
void pf_draw_cluster_stats(pf_t *pf, struct _rtk_fig_t *fig)
void pf_draw_cep_stats(pf_t *pf, struct _rtk_fig_t *fig)
void pf_draw_samples(pf_t *pf, struct _rtk_fig_t *fig, int max_samples)
ROSCPP_DECL void set(const std::string &key, const XmlRpc::XmlRpcValue &v)
void pf_draw_hist(pf_t *pf, struct _rtk_fig_t *fig)
void pf_matrix_unitary(pf_matrix_t *r, pf_matrix_t *d, pf_matrix_t a)
void pf_get_cep_stats(pf_t *pf, pf_vector_t *mean, double *var)