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

obotic's profile - activity

2023-02-23 13:43:43 -0500 received badge  Enthusiast
2023-02-20 19:51:55 -0500 asked a question Recording bag files over network with shared timestamp

Recording bag files over network with shared timestamp I have 3 machines that are networked together with one serving as

2018-10-11 16:21:13 -0500 marked best answer mapviz - transforming local xy coordinate frame to tile map lat/lon coordinate frame

I am running a tile map plugin for mapviz. As I move my mouse on the map I can see the GPS coordinates changing on the ui interface. I also used the swri_transform_util to give my robot a lat/lon xy origin. Now I am trying to use the point click publisher to get lat/lon coordinates when a place on the map is clicked. I am not sure what the tile map frame is however. I can get my robot's local xy position when I click on the map, but not sure how to transform it to the lat/lon coordinate.

2018-08-08 01:29:44 -0500 marked best answer utm points drifting on rviz over time

I have a set of gps navsatfix points that are recorded within a visible physical boundary when viewed on a google satellite image. I am using rviz_satellite to view the utm points on the satellite image, but I noticed that my trajectory is drifting south over time. Based on the answer given below regarding rviz float32 precision:

http://answers.ros.org/question/33624...

I changed my tf transform to:

tf::Transform transform;
transform.setOrigin( tf::Vector3( (utmpoint.easting-easting_ref), (utmpoint.northing-northing_ref), utmpoint.altitude ));
tf::Quaternion q;
q.setRPY(0, 0, 0);
transform.setRotation(q);
br.sendTransform(tf::StampedTransform(transform, msg->header.stamp, frame_fix_origin, frame_robot));

where ref_easting and ref_northing are utm points captured from my first incoming gps message, therefore now my first tf x,y coordinate starts at (0,0). On rviz Fixed Frame is set to frame_fix_origin and Robot frame(from rviz_satellite package) is set to frame_robot, but I still see the drift happening.

If I use another mapping visualization tool called mapviz(which has its own lat long to local xy coordinate system) and feed it my gps coordinates(using same maptile URI source) everything is displayed correctly, there is no drift. So I think my raw /fix coordinates are fine. Either I'm doing the transformation wrong when giving it to rviz or maybe the rviz_satellite is not projecting the satellite images correctly or it's something else.

I guess my question is has anyone used rviz_satellite and been able to plot their utm points without seeing this drift?

2018-08-08 01:28:54 -0500 received badge  Famous Question (source)
2017-11-13 15:58:12 -0500 received badge  Student (source)
2017-11-03 07:03:03 -0500 received badge  Notable Question (source)
2017-11-02 10:14:07 -0500 received badge  Famous Question (source)
2017-09-25 20:35:02 -0500 received badge  Notable Question (source)
2017-06-05 02:33:10 -0500 received badge  Popular Question (source)
2017-06-05 02:01:20 -0500 answered a question utm points drifting on rviz over time

Well I still don't know why the drift happens, but I started to do the navsatfix to local coordinate transformation simi

2017-06-04 18:33:45 -0500 edited question utm points drifting on rviz over time

utm points drifting on rviz over time I have a set of gps navsatfix points that are recorded within a visible physical b

2017-06-04 17:27:03 -0500 asked a question utm points drifting on rviz over time

utm points drifting on rviz over time I have a set of gps navsatfix points that are recorded within a visible physical b

2017-04-24 15:25:34 -0500 received badge  Popular Question (source)
2017-04-21 00:23:14 -0500 received badge  Supporter (source)
2017-04-21 00:22:37 -0500 answered a question mapviz - transforming local xy coordinate frame to tile map lat/lon coordinate frame

As I was looking in some of the other swri packages there is a function called Wgs84FromLocalXy in package swri_transfor

2017-04-21 00:22:35 -0500 commented answer mapviz - transforming local xy coordinate frame to tile map lat/lon coordinate frame

Thanks Geoff, I forgot about that utility. I saw that there was no frame from the tile map which then made me realize ma

2017-04-20 16:14:19 -0500 asked a question mapviz - transforming local xy coordinate frame to tile map lat/lon coordinate frame

mapviz - transforming local xy coordinate frame to tile map lat/lon coordinate frame I am running a tile map plugin for

2013-10-10 01:14:24 -0500 received badge  Famous Question (source)
2013-10-09 23:53:36 -0500 received badge  Editor (source)
2013-10-07 20:43:53 -0500 commented answer Applying rotations to coordinate frames using TF

Thanks I think this may be the solution to our problem, I will test it out and post an update.

2013-10-06 20:01:37 -0500 received badge  Notable Question (source)
2013-10-06 13:54:09 -0500 received badge  Popular Question (source)
2013-10-06 13:44:34 -0500 commented answer Applying rotations to coordinate frames using TF

Ok I think I understand what you are saying, but let's say my imu was mounted 40deg in the positive yaw relative to /base_link. Now if the imu sees a roll, the /base_link needs to interpret the imu's roll as a combination of pitch and yaw. I know the yaw is 40(I think) but how would I know the pitch

2013-10-06 12:15:11 -0500 commented answer Applying rotations to coordinate frames using TF

Sorry I meant to say "(new_roll,new_pitch,new_yaw) to be (80,100,120)" not (80,90,120)

2013-10-06 10:36:57 -0500 asked a question Applying rotations to coordinate frames using TF

Hello, I have two frames on my robot, /base_link and /frame_imu. The imu is positioned 90deg in the positive yaw direction relative to the robot center(or /base_link). So basically a roll in the imu's coordinate frame would correspond to a pitch in the robot's coordinate frame. From what I understand I should be able to use TF's transform_broadcaster to broadcast this transformation:

  tf::Transform transform;
  transform.setOrigin( tf::Vector3(0.0, 0.0, 0.0) );
  transform.setRotation( tf::createQuaternionFromRPY(0,0,M_PI/2) );
  tf_broadcast->sendTransform(tf::StampedTransform(transform, ros::Time::now(), "/base_link", "imu_frame"));

At first I thought if I just use TF's lookupTransform I could get the correct transformation between frames(my imu's frame_id is set to /imu_frame):

void imuCallback(const sensor_msgs::Imu::ConstPtr& msg){
tf::StampedTransform transform;

listener->waitForTransform("/base_link",
                                    msg->header.frame_id,
                                    msg->header.stamp,
                                    ros::Duration(3.0));

listener->lookupTransform("/base_link",
                                  msg->header.frame_id,
                                  msg->header.stamp,
                                  transform);

That just gives me the transformation (0,0,M_PI/2), then I could use TF's transformQuaternion to actually perform the rotation from the imu's frame to the robot's frame:

geometry_msgs::QuaternionStamped imu_quat = geometry_msgs::QuaternionStamped();
imu_quat.header = msg->header;
imu_quat.quaternion = msg->orientation;
geometry_msgs::QuaternionStamped q_robot;
listener->transformQuaternion("base_link",msg->header.stamp,imu_quat, imu_quat.header.frame_id, q_robot);
tf::Quaternion quatquat;
tf::quaternionMsgToTF(q_robot.quaternion,quatquat);
tf::Matrix3x3(quatquat).getEulerYPR(new_yaw,new_pitch,new_roll);

What happens is if my imu reads a (Yaw,Pitch,Roll) of say (80,10,120) I would expect my (new_roll,new_pitch,new_yaw) to be (80,90,120) but instead I get (170,10,120) so it just adds the yaw factor. Is trasnformQuaternion the right method for what I want to achieve? Any help to point me in the right direction would be greatly appreciated.

EDIT/UPDATE:

Well I don't think the twists really made a difference. I imagined that if my frame transformation setup is:

  tf::Transform transform;
  transform.setOrigin( tf::Vector3(0.0, 0.0, 0.0) );
  transform.setRotation( tf::createQuaternionFromRPY(0,0,M_PI/2) );
  tf_broadcast->sendTransform(tf::StampedTransform(transform, ros::Time::now(), "/base_link", "imu_frame"));

And I have the twists set up like so:

        geometry_msgs::Twist robot_twist;
        listener.lookupTwist("/imu_frame","/base_link",ros::Time(0),ros::Duration(3.0),robot_twist);

Then if I perform a roll on my /imu_frame, I should see an angular velocity increase on the pitch(robot_twist.angular.y) of my /base_link , but I still see the angular velocity of roll(robot_twist.angular.x) increasing on /base_link . It may be that I am not doing the broadcast of frame transforms correctly