Skip to content
Snippets Groups Projects
Commit eb67cde9 authored by Joan Vallvé Navarro's avatar Joan Vallvé Navarro
Browse files

publishing processor motion odom from origin

parent acf2dcbe
No related branches found
No related tags found
2 merge requests!5After cmake and const refactor,!3new release
......@@ -265,11 +265,12 @@ void SubscriberImu::callback(const sensor_msgs::Imu::ConstPtr& msg)
// initialize processor_motion pointer
if (not processor_motion_ptr_)
for (auto proc : sensor_ptr_->getProcessorList())
if (std::dynamic_pointer_cast<ProcessorMotion>(proc) != nullptr)
{
processor_motion_ptr_ = std::static_pointer_cast<ProcessorMotion>(proc);
{
processor_motion_ptr_ = std::dynamic_pointer_cast<ProcessorMotion>(proc);
if (processor_motion_ptr_ != nullptr)
break;
}
}
// abort if no processor_motion (strange...)
if (not processor_motion_ptr_)
{
......@@ -283,8 +284,8 @@ void SubscriberImu::callback(const sensor_msgs::Imu::ConstPtr& msg)
// get current and origin states
auto origin_state = processor_motion_ptr_->getOrigin()->getFrame()->getState("PO");
auto current_state = sensor_ptr_->getProblem()->getState("PO");
auto current_ts = sensor_ptr_->getProblem()->getTimeStamp();
auto current_state = processor_motion_ptr_->getState("PO");
auto current_ts = processor_motion_ptr_->getTimeStamp();
if (not origin_state.includesStructure("PO") or not current_state.includesStructure("PO"))
return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment