Skip to content

Instantly share code, notes, and snippets.

View heuristicus's full-sized avatar

Michal Staniaszek heuristicus

  • Oxford Robotics Institute
  • Oxford
View GitHub Profile
@LimHyungTae
LimHyungTae / angle_type_conversion.cpp
Last active December 4, 2023 14:45
ROS quaternion to rotation matrix OR rotation matrix to roll-pitch-yaw OR roll-pitch-yaw to quaternion
#include <iostream>
#include <tf/tf.h>
int main(){
/**< Declaration of quaternion */
tf::Quaternion q;
q.setW(1);
q.setX(0);
q.setY(0);
@marcoarruda
marcoarruda / conversion_node.cpp
Last active June 27, 2024 20:26
ROS Quaternion to RPY
#include <tf/tf.h>
#include <nav_msgs/Odometry.h>
#include <geometry_msgs/Pose2D.h>
ros::Publisher pub_pose_;
void odometryCallback_(const nav_msgs::Odometry::ConstPtr msg) {
geometry_msgs::Pose2D pose2d;
pose2d.x = msg->pose.pose.position.x;
pose2d.y = msg->pose.pose.position.y;