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

Hardware Trigger Setup for microstrain 3DM-CV7-AHRS #260

Open
Alex-Beh opened this issue Jul 11, 2023 · 11 comments
Open

Hardware Trigger Setup for microstrain 3DM-CV7-AHRS #260

Alex-Beh opened this issue Jul 11, 2023 · 11 comments
Labels
documentation Improvements or additions to documentation New This issue is new, and should not be marked as stale

Comments

@Alex-Beh
Copy link

Hi, I am trying to configure the hardware triggering application on microstrain 3DM-CV7-AHRS. I am following the tutoral ynchronizing Data Output with an External System. I use packet builder to send all the commands (as shown below).

microstrain_packet_builder

However, the first issue I encounter is I cannot see the event 2 in data streaming.
microstrain_event1

I want to make sure the configuration is okay first before move to ROS wrapper. But I am unable to stream the event 2 from SensorConnect.

Here is the json config file. Have renamed the extension to txt because I am unable to upload json file here.
3DM-CV7-AHRS_config.txt

@Alex-Beh Alex-Beh added the enhancement New feature or request label Jul 11, 2023
@github-actions github-actions bot added the New This issue is new, and should not be marked as stale label Jul 11, 2023
@microstrain-sam
Copy link

Hi Alex,

I followed the tutorial and verified that the CV7 behaves as expected. You can verify your device is streaming both AHRS and Filter data by looking for packets with descriptor set (third byte) 0x80 and 0x82 in the byte monitor. You should see "75 65 80 ..." and "75 65 82 ...".

The tutorial configures 1 trigger and 2 actions associated with it - one message action for AHRS data and one for Filter data. SensorConnect uses the term "event" to mean "trigger", so there is no "Event 2" because there's only one trigger.

Instead, "Event 1" contains data from both AHRS and Filter message actions. The filter data says (Est) next to it, short for "estimation filter". E.g. "Roll (Est)". The timestamps are grouped separately as "AHRS" and "Est Filter". If I select the pitch, roll, or yaw fields they appear in the time series plot.

Unless I missed something it seems everything is working and you should be able to move on to the ROS integration. I'll pass this info along to the SensorConnect team.

Sam

@microstrain-sam microstrain-sam added documentation Improvements or additions to documentation and removed enhancement New feature or request labels Jul 12, 2023
@Alex-Beh
Copy link
Author

Alex-Beh commented Jul 12, 2023

@microstrain-sam Thanks for your reply and it make the entire thing more clear to me now. I have also tried to add other data into the action such as Scaled Gyro (0x80,0x05) but I remember it will not appear in the list of Event 1. May I know is that the case for you also? Or the action only can stream certain type of data from the 0x80 and 0x82?

Besides, does the current ROS integration stream the event data? If not, do you mind to give some hint which or where should I add the relevant code? Will do the PR after testing.

---Update---
I think I didn't update the number of field correctly, will do another test tomorrow and update here again.

@robbiefish
Copy link

Hi @Alex-Beh, the driver does not support event data at all right now.

When event data is streamed it will be output like normal data, so the logic in publishers.cpp should handle parsing and populating the ROS messages just fine, the issue is that it will be interspersed with non event data.

If you only care about getting event data, this could be fixed by simply setting an empty message format. You could do that here by sending an empty array to this function. In this case, we will still configure all the ROS publishers, but we will only publish a ROS message when we get event data as that is the only kind of data the driver will receive from the device.

If you do care about both event data and non event data, that is a much more complicated issue. You would need to set up new publishers for each event, and depending on the event source populate the appropriate message.

In regards to the data not showing up in the list of Event 1, @microstrain-sam and I tested this and saw similar behavior when we first configured the event in SensorConnect, but after reconnecting the device (via the SensorConnect disconnect and reconnect button), the data started showing up in SensorConnect

@Alex-Beh
Copy link
Author

You could do that here by sending an empty array to this function.

The only way to do this is hardcode in the source code? Or there is a way to configure in the launch file?

I only care about the event data so what I did now is configure the IMU to only output the event data and set the device_setup to false in the launch file. Everything works fine and I manage to get the IMU data from hardware triggering. I am intended to use the params.yml to configure what I did in SensorConnect but it seem not everything is supported from the parameter file right now? Only can find the gpio relevant setup

@Guoc0529
Copy link

您可以通过向此函数发送一个空数组来完成操作。

做到这一点的唯一方法是在源代码中硬编码?或者有没有办法在启动文件中配置?

我只关心事件数据,所以我现在所做的是将 IMU 配置为仅输出事件数据,并device_setup在启动文件中将其设置为 false。一切工作正常,我设法从硬件触发获取 IMU 数据。我打算使用 params.yml 来配置我在 SensorConnect 中所做的操作,但现在参数文件似乎并不支持所有内容?只能找到gpio相关设置

@Alex-Beh
Hello, have you set up the 3dmcv7 hardware trigger? I tried setting it up in the Windows workstation, but it doesn't seem to work. My main goal is to configure it in the ROS driver and trigger it through FPGA. Do you have any experience with this?

@Alex-Beh
Copy link
Author

Yes eventually I have successfully setup the hardware trigger for 3dmcv7. Have you followed the steps here? https://s3.amazonaws.com/files.microstrain.com/CV7+Online/user_manual_content/app_notes/Example%20Synchronized%20Data%20Output.htm

@Guoc0529
Copy link

I want to use hardware synchronization in ROS, how do I set up the yaml file? Are there any other settings needed?

Yes eventually I have successfully setup the hardware trigger for 3dmcv7. Have you followed the steps here? https://s3.amazonaws.com/files.microstrain.com/CV7+Online/user_manual_content/app_notes/Example%20Synchronized%20Data%20Output.htm

I want to use hardware synchronization in ROS, how do I set up the yaml file? Are there any other settings needed?

@Alex-Beh
Copy link
Author

No special file, just follow the steps few times and you will achieve what you want. I can share you my json file once I have access to my sensor next time.

Can I have your contact? would like to have deeper discussion with you.

@Guoc0529
Copy link

无需特殊文件,只需按照步骤几次即可实现您想要的。下次我可以访问我的传感器时,我可以与您分享我的 json 文件。

能给我你的联系方式吗?想与您进行更深入的讨论。

My email is guoc171@163.com. Thank you very much!

@Guoc0529
Copy link

No special file, just follow the steps few times and you will achieve what you want. I can share you my json file once I have access to my sensor next time.

Can I have your contact? would like to have deeper discussion with you.

@Alex-Beh
Hello! Can we chat when you're free? Are you too busy, do you think?

@Guoc0529
Copy link

Hi @Alex-Beh, the driver does not support event data at all right now.

When event data is streamed it will be output like normal data, so the logic in publishers.cpp should handle parsing and populating the ROS messages just fine, the issue is that it will be interspersed with non event data.

If you only care about getting event data, this could be fixed by simply setting an empty message format. You could do that here by sending an empty array to this function. In this case, we will still configure all the ROS publishers, but we will only publish a ROS message when we get event data as that is the only kind of data the driver will receive from the device.

If you do care about both event data and non event data, that is a much more complicated issue. You would need to set up new publishers for each event, and depending on the event source populate the appropriate message.

In regards to the data not showing up in the list of Event 1, @microstrain-sam and I tested this and saw similar behavior when we first configured the event in SensorConnect, but after reconnecting the device (via the SensorConnect disconnect and reconnect button), the data started showing up in SensorConnect

Hello, I have successfully set up event triggering on Windows. When there is a pulse, Event 1 outputs data, and it doesn't output anything when there's no pulse. However, I want to use this in ROS and I'm not sure how to set it up to work the same way as in Windows. Alternatively, how can I use the data from Event 1?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation New This issue is new, and should not be marked as stale
Projects
None yet
Development

No branches or pull requests

4 participants