Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added first commit for diagnostics for the phidgets. #20

Closed
wants to merge 2 commits into from
Closed

Added first commit for diagnostics for the phidgets. #20

wants to merge 2 commits into from

Conversation

keshaviyengar
Copy link
Contributor

Hi,

This just my first commit for the diagnostics. Check and see if this works on the imu (should be working). I can also add other information if you would like.

Thanks,

@muhrix
Copy link
Collaborator

muhrix commented Nov 14, 2015

This looks good to me.
@mintar could you please double check #20 before I merge?

@@ -17,5 +17,10 @@
<author email="patrick@phidgets.com">Copyright (C) 2010 Phidgets Inc. </author>

<buildtool_depend>catkin</buildtool_depend>
<build_depend>diagnostics_updater<build_depend>
<build_depend>diagnostics_msgs<build_depend>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing slash ("/") in the two closing tags above.

@keshaviyengar
Copy link
Contributor Author

OK, will fix these soon and update pull request. Thanks for the corrections.

@mintar
Copy link
Contributor

mintar commented Nov 16, 2015

Don't merge yet.

I've added a couple of comments; they need to be fixed to make it compile.

Also, the last diagnostics message needs to be published periodically (let's say once a second). Otherwise the diagnostics don't show up until the state changes, and then they will be marked stale in rqt_runtime_monitor.

how to test:

Launch file:

<node pkg="diagnostic_aggregator" type="aggregator_node"
      name="diagnostic_aggregator" >
  <rosparam command="load" 
            file="$(find my_pkg)/analyzers.yaml" />
</node>

analyzers.yaml:

pub_rate: 1.0 # Optional
base_path: '' # Optional, prepended to all diagnostic output
analyzers:
#  motors:
#    type: GenericAnalyzer
#    path: Motors
#    startswith: 'EtherCAT'
  sensors:
    type: AnalyzerGroup
    path: Sensors
    analyzers:
      imu:
        type: GenericAnalyzer
        path: IMU
        timeout: 5.0
        find_and_remove_prefix: imu_node
        num_items: 3

Then rosrun rqt_runtime_monitor rqt_runtime_monitor.

* Added "/" for closing tags in package.xml
* Moved lines to non-static function as required.
@mintar
Copy link
Contributor

mintar commented Nov 19, 2015

Ah, I saw that you already added a commit. Yep, that's what I meant. So now what's missing before we can merge is the periodic publishing. Could you add a comment once you've done that? I only get notifications for comments, not new commits added to the PR.

@keshaviyengar
Copy link
Contributor Author

Yes, I will comment once I am done.

@keshaviyengar
Copy link
Contributor Author

So far the periodic publishing, I just need to add the aggregator and add the analyzers.yaml with the pub_rate: 1.0 #Hertz ?

@mintar
Copy link
Contributor

mintar commented Jan 4, 2016

Sorry for the late reply - family obligations! :)

So far the periodic publishing, I just need to add the aggregator and add the analyzers.yaml with the pub_rate: 1.0 #Hertz ?

No, you need to call updater.update() somewhere where it will be called periodically. The easiest place would probably be in ImuRosI::processImuData(). On that note, you should perhaps move the whole diagnostics stuff from phidgets_api to phidgets_imu. You should probably also replace the Publishers in phidgets_imu by DiagnosedPublishers.

@keshaviyengar
Copy link
Contributor Author

Thanks for the help! I'll get this done this week and comment with an update.

@mani-monaj
Copy link
Contributor

@kkiyenga It's an a good feature to have. Have you had a chance to update the diagnostics code? I volunteer to continue this development if you are not working on it anymore.

@keshaviyengar
Copy link
Contributor Author

@mani-monaj I can work on it later this month or if you really interested you can definitely finish it up.

@mani-monaj
Copy link
Contributor

@kkiyenga Thanks for your quick reply. I will most likely start doing it later this week. I think I can finish it up.

mani-monaj added a commit to akrobotics/phidgets_drivers that referenced this pull request Jul 14, 2016
- Remove all diagnostics logic from phidget_api
- Add diagnostics to phidgets_imu
  - Connect/disconnect/error states are propogated from callbacks
  - Periodic updates for diagnostics through processImuData()
  - Add Frequency and Timestamp (drift) diagnostics for imu/data_raw
  topic
mani-monaj pushed a commit to akrobotics/phidgets_drivers that referenced this pull request Jul 14, 2016
* Added "/" for closing tags in package.xml
* Moved lines to non-static function as required.
mani-monaj added a commit to akrobotics/phidgets_drivers that referenced this pull request Jul 14, 2016
- Remove all diagnostics logic from phidget_api
- Add diagnostics to phidgets_imu
  - Connect/disconnect/error states are propogated from callbacks
  - Periodic updates for diagnostics through processImuData()
  - Add Frequency and Timestamp (drift) diagnostics for imu/data_raw
  topic
mani-monaj added a commit to akrobotics/phidgets_drivers that referenced this pull request Jul 14, 2016
- Remove all diagnostics logic from phidget_api
- Add diagnostics to phidgets_imu
  - Connect/disconnect/error states are propogated from callbacks
  - Periodic updates for diagnostics through processImuData()
  - Add Frequency and Timestamp (drift) diagnostics for imu/data_raw
  topic
mani-monaj added a commit to akrobotics/phidgets_drivers that referenced this pull request Jul 14, 2016
- Remove all diagnostics logic from phidget_api
- Add diagnostics to phidgets_imu
  - Connect/disconnect/error states are propogated from callbacks
  - Periodic updates for diagnostics through processImuData()
  - Add Frequency and Timestamp (drift) diagnostics for imu/data_raw
  topic
@mintar
Copy link
Contributor

mintar commented Sep 6, 2016

This PR can be closed (moved to #24 ).

muhrix added a commit that referenced this pull request Nov 20, 2016
Add IMU diagnostics (related to #20)
@muhrix muhrix closed this Nov 20, 2016
dogoepp pushed a commit to resibots/phidgets_drivers that referenced this pull request Jan 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants