ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Jurica's profile - activity

2016-11-28 07:40:55 -0500 received badge  Good Question (source)
2014-01-28 17:22:05 -0500 marked best answer GPS track angle (Course over ground)

I have question about track angle. I use gpss_client(for CTurtle) and in topic fix (gps_common/GPSFix) which besides latitude, longitude, altitude, speed, DOP factors give track angle which definition in fix topic in short is Direction in degrees from north. So i use google and find that angle is relative direction of travel to a ground position(same as Course Over Ground). In gorund robots we can asumme that track is equal heading which in marine vessels must be corrected for wind and sea current ( http://en.wikipedia.org/wiki/Course_%... ). One definition of track angle is at: http://www.ehow.com/about_5584477_gps... So my question is how is track angle measured. If we use compas convention that this angle is measured from true north in clock wise direction so North is 0° and East is 90°. But i think here in ROS is opposite 0° is North and 90° is West(counter-clock wise direction.) I read that all coordinate systems in ROS are right-handed(and that counter-clockwise direction is positive directon. Well if someone uses track and know in which direction form North track angle is measured(CCW(left) or CW(right)), can that knowdlege share with me,and other ROS users in forum.

What i think is that track angle is measured form North(0°) to West(90°)in counter clockwise direction.(my GPs reciever is LS20030 from Locosys.)

2014-01-28 17:21:52 -0500 marked best answer How to write node for collecting data from P3AT robot

I have question. I wish to collect velocity (left and right speed)data from Pioneer 3AT, and for that write node, and that data i want to use for odometry. I ask if someone can me direct on right path. There are some tutorials but i dont know which i need to look. If someone have idea, please to give me some suggestion. Thanks!

2014-01-28 17:21:51 -0500 marked best answer Using utm_odometry_node to convert GPS mesurement to obtain x y coordinates

I'm Jurica, student at Faculty of Electrical Engineering and Computing (FER). I use ROS CTurtle (instaled in VirtualBox) and I wish to use utm_odometry_node(in gps_common package) to convert GPS latitude and longitude in (x y) coordinates.

I need convert these measurement because I will use them with odometry in EKF for robot localization in outdoor environment.

Except latitude and longitude (which i want to convert) I would use Direction(from north) and HDOP factor.(i use old msgs:gps_common/GPSStatus and gps_common/GPSFix)

So i read problem in gpsd_client tutorials(http://answers.ros.org/question/82/problem-in-gpsd_client-tutorials)and I was modified code explained there:

#include"ros/ros.h"
#include<iostream>
#include<gps_common/GPSFix.h>
#include<gps_common/GPSStatus.h>
using namespace gps_common; // in original ansewr namespace is missing so code don't work

void callback(const gps_common::GPSFix::ConstPtr &msg){ // instead &msg there can be &fix
//  if(msg->status.status == GPSStatus::STATUS_NO_FIX){
//    std::cout <<"Unable to get a fix on the location." << std::endl;
//    return;
//  }
     std::cout << "Current Latutide:" << msg->latitude << std::endl;
     std::cout << "Current Longitude:" << msg->longitude << std::endl;
     std::cout << "Current Altitude:" << msg->altitude << std::endl;
     std::cout << "Direction(from north):" << msg->track << std::endl;
     std::cout << "HDOP:" << msg->hdop << std::endl;
     //std::cout << "Status:" << msg->status.status << std::endl;
     //std::cout << "Service:" << msg->status.service << std::endl;
}

int main(int argc, char **argv) {
  ros::init(argc,argv,"gps_subscriber");
  ros::NodeHandle nh;
  ros::Subscriber gps_sub=nh.subscribe("fix",1,callback);
  ros::spin();
  return 0;

}

So i ask if i can change utm_odometry_node somehow to use instead sensor_msgs/NavSatStatus and sensor_msgs/NavSatFix old msg tpye: gps_common/GPSStatus and gps_common/GPSFix. Old msg type have HDOP and Direction information and new don't have. (I use LS20030(USB interface) MTK Smart Antenna GPS reciever(http://www.locosystech.com/product.php?zln=en&id=20)). Well if someone have some useful information i would be greatfull.

2013-12-10 04:34:39 -0500 received badge  Taxonomist
2013-01-02 03:25:54 -0500 marked best answer Conversion accuracy from (latitude, longitude) to (x,y) by utm_odometry_node

I wrote node for subscribing to the odom topic(nav_msgs/Odometry) at which utm_odometry_node publish results of conversion from (latitude, longitude)(degres)to (x,y)(meters). So my question is is that conversion to (x,y) valid? (I use C Turtle.Code of node who is sunscribing to odom topic is here in answer of my orevious question: http://answers.ros.org/question/485/u... )

Example: That gives gpsd_client: (coordinates in Croatia, nortwest) latitude: 46.3954 longitude: 16.448 That gives utm_odometry_node: x:611320 y:5.139e+06 I think that in x coordinate one digit is missing. Well if someone is working with utm_odometry_node and know something about conversion(accuracy, problems, etc.),please let write answer. Thanks

2013-01-02 03:25:20 -0500 received badge  Nice Question (source)
2012-10-01 00:03:21 -0500 received badge  Famous Question (source)
2012-10-01 00:03:21 -0500 received badge  Notable Question (source)
2012-09-09 22:04:30 -0500 received badge  Famous Question (source)
2012-07-18 08:55:28 -0500 received badge  Popular Question (source)
2012-04-23 02:29:31 -0500 received badge  Famous Question (source)
2012-02-01 12:54:55 -0500 received badge  Nice Answer (source)
2012-02-01 12:54:55 -0500 marked best answer Using utm_odometry_node to convert GPS mesurement to obtain x y coordinates

Here is simple code for node who is extracting X Y data form odom topic:

#include"ros/ros.h"
#include<iostream>
#include<nav_msgs/Odometry.h>
using namespace nav_msgs;

void callback(const OdometryConstPtr &odom){

std::cout << "X_gps[m]:" << odom->pose.pose.position.x << std::endl;
std::cout << "Y_gps[m]:" << odom->pose.pose.position.y << std::endl;
}

int main(int argc, char **argv){
ros::init(argc,argv,"gps_xy");
ros::NodeHandle nh;

ros::Subscriber sub = nh.subscribe("odom",1,callback);

ros::spin();
return 0;
}
2012-01-22 23:24:32 -0500 received badge  Famous Question (source)
2011-11-06 10:37:32 -0500 received badge  Notable Question (source)
2011-09-21 06:23:23 -0500 received badge  Notable Question (source)
2011-08-30 12:46:05 -0500 received badge  Notable Question (source)
2011-07-16 17:15:33 -0500 received badge  Popular Question (source)
2011-06-14 10:40:38 -0500 received badge  Popular Question (source)
2011-06-14 01:18:53 -0500 received badge  Popular Question (source)
2011-05-17 22:50:38 -0500 marked best answer How to write node for collecting data from P3AT robot

Hi,

Both p2os_driver and ROSARIA publish nav_msgs/Odometry on "pose" topic. Therefore, it suffices to subscribe to the "pose" topic and collect Odometry messages.

If you really need left and right wheel velocities, you should use specific robot parameters and get those speeds from linear and angular velocities that are reported in the Odometry message.

Just one more note, ROSARIA reported Pose in [mm] prior to Feb 24, 2011. As of that date, we've fixed it to report Pose in [m].

2011-05-17 06:44:37 -0500 commented answer GPS track angle (Course over ground)
So if I want true heading of robot i must add track+90°(or -(270-track) gives same result) , and i finnaly have same odometry frame in right angle towards global GPS (UTM) frame.(I plot odometryin utm and GPS x,y in utm and they match, so i think that is good).
2011-05-17 06:39:15 -0500 commented answer GPS track angle (Course over ground)
I think i will use ENU system so track angle which GPs gives(fix topic) is angle which shows how far from north y-axis is rotated in right direction. Robot (P3AT) heading is 0° and turns about x-axes(what ROS gives is negative angluar velocity so turns in clockwise direction).
2011-05-17 06:31:59 -0500 commented answer GPS track angle (Course over ground)
I plan to use gps track angle for fusion with odometry heading, so i use odometry + GPS in EKF and i plan to fuse measurements form GPSn like x,y(in utm system) and gps track angle and speed which GPS gives(SOG). First realization in Matlab and then i hope so in ROS.
2011-05-17 02:58:06 -0500 marked best answer GPS track angle (Course over ground)

So, the two major conventions for GPS is NED (North-East-Down) and ENU (East-North-Up). Both of these are right-handed. NED is commonly used in aerial vehicles, where everything of interest is below, and ENU is commonly used in ground-based vehicles, where altitude is of interest.

Heading is represented in the NED coordinate system. This means that your heading, Phi, is 0 in the North direction, and is positive in the East direction, the same as a compass heading.

ROS works better following the ENU convention, as it more closely matches the body coordinate frame (X-forward,Y-left,Z-up).

Basically, you probably want to choose a convention for your work, and rotate the course over ground heading into your chosen coordinate frame. Looking at the datasheet for your receiver, it looks like course over ground is given as a compass heading (ENU) from True north, or Magnetic north, whichever you choose to use.

To get this into NED coordinates, you need to rotate the ENU coordinate frame. This can be accomplished using quaternions, rotation matricies, etc.

Assuming that your heading is represented in Radians, with North = 0, Pi to -Pi

  1. Subtract pi/2 from your heading (phi -= pi/2)
  2. Negate your heading (phi = -phi)
  3. Check the wrap on your heading (re-wrap to Pi to -Pi)

I'm not sure if a checkwrap function exists in ROS's geometry libraries, but you can get an example from https://github.com/wjwwood/au-automow/blob/master/au_automow_common/automow_ekf/src/automow_ekf.cpp" title="Github">Our EKF Functions, where we had to deal with the same problem.