-
Notifications
You must be signed in to change notification settings - Fork 8
MVP Hardware Node #113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
MVP Hardware Node #113
Conversation
feat: add ControllerMessage.msg to 'truck_msgs' for telemetry topics feat: create package/hardware_node_2
Signed-off-by: Dergousov Maxim <[email protected]>
fix: remove build files
…boratory/truck into m7kss1-hardware-node
Signed-off-by: Dergousov Maxim <[email protected]>
Signed-off-by: Dergousov Maxim <[email protected]>
fix: сode style improvements
fix: сode style improvements
…boratory/truck into m7kss1-hardware-node
Signed-off-by: Dergousov Maxim <[email protected]>
Signed-off-by: Dergousov Maxim <[email protected]>
…boratory/truck into m7kss1-hardware-node
| twist = model_->baseToRearTwist(twist); | ||
| auto steering = model_->rearTwistToSteering(twist); | ||
| RCLCPP_INFO(this->get_logger(), "Center curv: %.2f", msg.curvature); | ||
| RCLCPP_INFO(this->get_logger(), "Rear curv: %.2f", twist.curvature); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Про teensy забыли совсем)
| memcpy(&voltage, voltageFrame.first.data, sizeof(voltage)); | ||
| memcpy(¤t, voltageFrame.first.data + 4, sizeof(current)); | ||
|
|
||
| auto encoderFrame = framesCache[CmdId::kGetEncoderEstimates]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Мы не так договаривались делать, а написать специальную функцию, которая достает фрейм + сразу проверяет, что он достаточно свежий
| std::chrono::system_clock::time_point curTime = std::chrono::system_clock::now(); | ||
| auto curTimeMs = std::chrono::time_point_cast<std::chrono::milliseconds>(curTime); | ||
| auto msgTimeMs = std::chrono::time_point_cast<std::chrono::milliseconds>(msgTime); | ||
| return (curTimeMs >= msgTimeMs - 2 * delay); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Кажется time_point - time_point = duration??
No description provided.