Comments (6)
phidgets provides a partial piece of code in c that would provide compass direction; but it would have to be rewritten to make it work in ROS - so I was trying to avoid doing that... https://www.phidgets.com/docs/Magnetometer_Primer#Calculating_Heading_from_Magnetometer_Data
(code is at the bottom of the page this link takes you to)
Ah, I see. Yeah, you'll have to write that code to take in the data from ROS and calculate it yourself. There might be some argument for including that as part of the phidgets_spatial package, but I'm not entirely sure if we should do that. @mintar thoughts on that?
from phidgets_drivers.
Look at this launch file: https://github.com/ros-drivers/phidgets_drivers/blob/melodic/phidgets_imu/launch/imu.launch
That launch file passes the messages from the phidgets driver to the imu_filter_madgwick, which fills out the orientation field in the message. You should pass that message (along with the wheel odometry) to robot_localization, which will fuse the information and publish a odom -> base_link tf transform. Then you'll probably also start amcl localization, which publishes the map -> odom transform. Together they give you the map -> base_link transform, which will be used by move_base or move_base_flex.
The magnetometer is pretty much useless on a wheeled indoor robot though, so I would recommend disabling it and only use the gyro and accelerometer.
from phidgets_drivers.
Can someone provide a link to the ROS code to get compass orientation from the phidgets spatial (IMU)? I can find the raw magnetometer data (xyz) code but am looking for the compass direction.
Unless I'm misreading the documentation, the libphidgets API doesn't provide this information (and hence, the ROS wrapper here doesn't either). It only provides for the raw magnetometer readings. You could combine the raw magnetometer data with the acceleration data to do it, but I understand it is pretty tricky. If you need this information, an easier solution may be to get an IMU that does these calculations onboard.
from phidgets_drivers.
phidgets provides a partial piece of code in c that would provide compass direction; but it would have to be rewritten to make it work in ROS - so I was trying to avoid doing that... https://www.phidgets.com/docs/Magnetometer_Primer#Calculating_Heading_from_Magnetometer_Data
(code is at the bottom of the page this link takes you to)
from phidgets_drivers.
thanks for checking into this. perhaps an additional (better?) question for me to ask is 'is there a link to a recommended ROS node that should use to bring the phidget magnetometer data into move_base or move_base_flex'?
from phidgets_drivers.
thanks for the great overview! and the links! I'll close this issue and follow up later in a new issue if I have more questions.
from phidgets_drivers.
Related Issues (20)
- Allow configuring encoder IOMode HOT 2
- phidgets_high_speed_encoder regression: duplicated joint state angles in all axis
- Should thermocouple package use sensor_msgs/Temperature instead of float64? HOT 8
- Fix gcc warnings on Ubuntu 22.04 HOT 1
- Port #127 to ROS2 (Add support for VINT networkhub) HOT 5
- Port #134 to ROS2 (sensor_msgs/Temperature and multi-channel readers)
- Port #137 to ROS2 (Support configuring encoder data interval and IO Mode)
- phidgets_high_speed_encoder: Failed to open device: Timed Out HOT 1
- PhidgetSpatial Precision IMU stops data output after first run on Jetson Orin HOT 2
- Feature Request: Flag for changing NED to ENU frame HOT 3
- Humble Branch compile issues HOT 3
- Port #153 to ROS2 (Add support for onboard orientation estimation and other new PhidgetSpatial features of MOT0109 and onwards) HOT 1
- MOT0110_0: Spatial: Failed to open device: Timed Out HOT 13
- Spatial: Failed to set algorithm magnetometer gain: Operation Not Supported HOT 4
- API of MOT0109 and MOT0110 is different HOT 2
- Drivers issues with older version of Phidgets HOT 3
- PhidgetManager_setOnErrorHandler symbol not found HOT 3
- Location affect to the orientation
- Port #173 to ROS2 (Add support for Phidgets Humidity sensors)
- [ROS2] there are no estimated orientation HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phidgets_drivers.