ROS Answers: Open Source Q&A Forum - RSS feedhttps://answers.ros.org/questions/Open source question and answer forum written in Python and DjangoenROS Answers is licensed under Creative Commons Attribution 3.0Mon, 16 Jul 2018 09:19:07 -0500Help with using encoder data from Arduino with localizationhttps://answers.ros.org/question/297407/help-with-using-encoder-data-from-arduino-with-localization/ Hello everyone,
I'm a beginner to the ROS world, I'm using wheel encoders and a lidar to make a localization and mapping robot.
My question is about how to import and use the wheel encoders data from Arduino to use with Robot_loclization package.
Thank youSun, 15 Jul 2018 03:12:47 -0500https://answers.ros.org/question/297407/help-with-using-encoder-data-from-arduino-with-localization/Answer by PeteBlackerThe3rd for <p>Hello everyone,</p>
<p>I'm a beginner to the ROS world, I'm using wheel encoders and a lidar to make a localization and mapping robot.</p>
<p>My question is about how to import and use the wheel encoders data from Arduino to use with Robot_loclization package.</p>
<p>Thank you</p>
https://answers.ros.org/question/297407/help-with-using-encoder-data-from-arduino-with-localization/?answer=297438#post-id-297438Wheel encoders will produce relative positron estimates, so you want to convert the rear values into geometry_msgs/TwistWithCovarianceStamped messages describing the angular and linear velocity of your robot. You will be able to calculate these knowing the geometry of the robot (diameter of the wheels and the distance between them).
The covariance values don't need to be calculated but you will at least need to put in constant values which are fairly realistic for the robot_localization package to work properly.
Once you have these twist messages being produced properly you can feed then directly into the robot_localization package. Sun, 15 Jul 2018 17:07:51 -0500https://answers.ros.org/question/297407/help-with-using-encoder-data-from-arduino-with-localization/?answer=297438#post-id-297438Comment by Tom Moore for <p>Wheel encoders will produce relative positron estimates, so you want to convert the rear values into geometry_msgs/TwistWithCovarianceStamped messages describing the angular and linear velocity of your robot. You will be able to calculate these knowing the geometry of the robot (diameter of the wheels and the distance between them).</p>
<p>The covariance values don't need to be calculated but you will at least need to put in constant values which are fairly realistic for the robot_localization package to work properly. </p>
<p>Once you have these twist messages being produced properly you can feed then directly into the robot_localization package. </p>
https://answers.ros.org/question/297407/help-with-using-encoder-data-from-arduino-with-localization/?comment=297551#post-id-297551For a differential drive robot, compute the linear velocity, and put that in the `twist.twist.linear.x` field. Then compute the angular velocity, and put that in the `twist.twist.angular.z` field. Then put non-zero values in the diagonal of the covariance matrix for those quantities.Mon, 16 Jul 2018 09:19:07 -0500https://answers.ros.org/question/297407/help-with-using-encoder-data-from-arduino-with-localization/?comment=297551#post-id-297551Comment by hamzh.albar@gmail.com for <p>Wheel encoders will produce relative positron estimates, so you want to convert the rear values into geometry_msgs/TwistWithCovarianceStamped messages describing the angular and linear velocity of your robot. You will be able to calculate these knowing the geometry of the robot (diameter of the wheels and the distance between them).</p>
<p>The covariance values don't need to be calculated but you will at least need to put in constant values which are fairly realistic for the robot_localization package to work properly. </p>
<p>Once you have these twist messages being produced properly you can feed then directly into the robot_localization package. </p>
https://answers.ros.org/question/297407/help-with-using-encoder-data-from-arduino-with-localization/?comment=297439#post-id-297439Cool, would you explain more on how to
1- convert the values into geometry_msgs/TwistWithCovarianceStamped messages ?
2-feed then directly into the robot_localization package.
Thank youSun, 15 Jul 2018 17:11:45 -0500https://answers.ros.org/question/297407/help-with-using-encoder-data-from-arduino-with-localization/?comment=297439#post-id-297439