36 std::default_random_engine generator;;
37 std::uniform_real_distribution<double> distr(-100.0, 100.0);
38 Eigen::Twistd srb_delta_pose_in_sf_next = Eigen::Twistd(distr(generator),distr(generator),distr(generator),
39 distr(generator),distr(generator),distr(generator) );
41 geometry_msgs::TwistWithCovariance hypothesis;
43 hypothesis.twist.linear.x = srb_delta_pose_in_sf_next.vx();
44 hypothesis.twist.linear.y = srb_delta_pose_in_sf_next.vy();
45 hypothesis.twist.linear.z = srb_delta_pose_in_sf_next.vz();
46 hypothesis.twist.angular.x = srb_delta_pose_in_sf_next.rx();
47 hypothesis.twist.angular.y = srb_delta_pose_in_sf_next.ry();
48 hypothesis.twist.angular.z = srb_delta_pose_in_sf_next.rz();
51 for (
unsigned int i = 0; i < 6; i++)
53 for (
unsigned int j = 0; j < 6; j++)
57 hypothesis.covariance[6 * i + j] = 1.0e6;
60 hypothesis.covariance[6 * i + j] = 1.0e3;
71 std::default_random_engine generator;;
72 std::uniform_real_distribution<double> distr(-100.0, 100.0);
73 Eigen::Twistd srb_delta_pose_in_sf_next = Eigen::Twistd(distr(generator),distr(generator),distr(generator),
74 distr(generator),distr(generator),distr(generator) );
76 geometry_msgs::TwistWithCovariance hypothesis;
78 hypothesis.twist.linear.x = srb_delta_pose_in_sf_next.vx();
79 hypothesis.twist.linear.y = srb_delta_pose_in_sf_next.vy();
80 hypothesis.twist.linear.z = srb_delta_pose_in_sf_next.vz();
81 hypothesis.twist.angular.x = srb_delta_pose_in_sf_next.rx();
82 hypothesis.twist.angular.y = srb_delta_pose_in_sf_next.ry();
83 hypothesis.twist.angular.z = srb_delta_pose_in_sf_next.rz();
86 for (
unsigned int i = 0; i < 6; i++)
88 for (
unsigned int j = 0; j < 6; j++)
92 hypothesis.covariance[6 * i + j] = 1.0e6;
95 hypothesis.covariance[6 * i + j] = 1.0e3;
112 std::default_random_engine generator;;
113 std::uniform_real_distribution<double> distr(-100.0, 100.0);
114 Eigen::Twistd srb_pose_in_sf_next = Eigen::Twistd(distr(generator),distr(generator),distr(generator),
115 distr(generator),distr(generator),distr(generator) );
117 geometry_msgs::TwistWithCovariance hypothesis;
118 hypothesis.twist.linear.x = srb_pose_in_sf_next.vx();
119 hypothesis.twist.linear.y = srb_pose_in_sf_next.vy();
120 hypothesis.twist.linear.z = srb_pose_in_sf_next.vz();
121 hypothesis.twist.angular.x = srb_pose_in_sf_next.rx();
122 hypothesis.twist.angular.y = srb_pose_in_sf_next.ry();
123 hypothesis.twist.angular.z = srb_pose_in_sf_next.rz();
126 for (
unsigned int i = 0; i < 6; i++)
128 for (
unsigned int j = 0; j < 6; j++)
132 hypothesis.covariance[6 * i + j] = 1.0e6;
135 hypothesis.covariance[6 * i + j] = 1.0e3;
141 #ifdef PUBLISH_PREDICTED_POSE_AS_PWC 144 geometry_msgs::PoseWithCovarianceStamped pose_with_cov_stamped;
146 pose_with_cov_stamped.header.frame_id =
"camera_rgb_optical_frame";
148 Eigen::Displacementd displ_from_twist = srb_pose_in_sf_next.exp(1e-12);
149 pose_with_cov_stamped.pose.pose.position.x = displ_from_twist.x();
150 pose_with_cov_stamped.pose.pose.position.y = displ_from_twist.y();
151 pose_with_cov_stamped.pose.pose.position.z = displ_from_twist.z();
152 pose_with_cov_stamped.pose.pose.orientation.x = displ_from_twist.qx();
153 pose_with_cov_stamped.pose.pose.orientation.y = displ_from_twist.qy();
154 pose_with_cov_stamped.pose.pose.orientation.z = displ_from_twist.qz();
155 pose_with_cov_stamped.pose.pose.orientation.w = displ_from_twist.qw();
157 for (
unsigned int i = 0; i < 6; i++)
158 for (
unsigned int j = 0; j < 6; j++)
159 pose_with_cov_stamped.pose.covariance[6 * i + j] = hypothesis.covariance[6 * i + j];
161 _predicted_next_pose_publisher.publish(pose_with_cov_stamped);
170 std::vector<visualization_msgs::Marker> empty_vector;
171 visualization_msgs::Marker empty_marker;
172 empty_marker.pose.position.x = 0.;
173 empty_marker.pose.position.y = 0.;
174 empty_marker.pose.position.z = 0.;
176 empty_marker.type = visualization_msgs::Marker::SPHERE;
177 empty_marker.action = visualization_msgs::Marker::DELETE;
178 empty_marker.scale.x = 0.0001;
179 empty_marker.scale.y = 0.0001;
180 empty_marker.scale.z = 0.0001;
181 empty_marker.color.a = 0.3;
182 empty_marker.color.r = 0.0;
183 empty_marker.color.g = 0.0;
184 empty_marker.color.b = 1.0;
185 empty_marker.ns =
"kinematic_structure";
187 empty_vector.push_back(empty_marker);
188 empty_marker.id = 3 * this->
_joint_id + 1;
189 empty_vector.push_back(empty_marker);
190 empty_marker.id = 3 * this->
_joint_id + 2;
191 empty_vector.push_back(empty_marker);
192 empty_marker.ns =
"kinematic_structure_uncertainty";
194 empty_vector.push_back(empty_marker);
195 empty_marker.id = 3 * this->
_joint_id + 1;
196 empty_vector.push_back(empty_marker);
197 empty_marker.id = 3 * this->
_joint_id + 2;
198 empty_vector.push_back(empty_marker);
210 return std::string(
"DisconnectedJointFilter");
virtual geometry_msgs::TwistWithCovariance getPredictedSRBVelocityWithCovInSensorFrame()
Generate a prediction about the velocity of the second rigid body (SRB) and its covariance using the ...
virtual geometry_msgs::TwistWithCovariance getPredictedSRBDeltaPoseWithCovInSensorFrame()
Generate a prediction about the change in pose of the second rigid body (SRB) and its covariance usin...
virtual double getProbabilityOfJointFilter() const
Return the normalized joint filter probability of the Disconnected Joint model, which is a constant v...
virtual JointFilterType getJointFilterType() const
virtual std::string getJointFilterTypeStr() const
DisconnectedJointFilter()
double _unnormalized_model_probability
virtual ~DisconnectedJointFilter()
virtual geometry_msgs::TwistWithCovariance getPredictedSRBPoseWithCovInSensorFrame()
Generate a prediction about the pose-twist of the second rigid body (SRB) and its covariance using th...
virtual std::vector< visualization_msgs::Marker > getJointMarkersInRRBFrame() const
virtual void initialize()
JointCombinedFilterId _joint_id