cliansang / uwb-tracking-ros

This repo demonstrates the tracking scenario for UWB Localization in ROS using the Decawave's TREK1000 (EVK1000 Evaluation Kits) and MDEK 1001 (DWM1001-DEV boards).
MIT License
31 stars 9 forks source link

Stationary Detection and ROS topics #2

Closed Russ76 closed 2 years ago

Russ76 commented 2 years ago

From the documentation and Decawave forum, I see that "stationary detection" may be turned off for the Tag, and this will cause the 10 Hz update rate to continue, and the Tag will not switch to the "energy conserving" 0.1 Hz update rate. This can be done under Tag settings on the Android App. I will try this next. It seems to have the "energy conservation" settings much too aggressive by default. That causes it to often run much too slowly. Updating position every 10 seconds would never work for a rover robot! Or for a flying robot, for that matter.

Thank you for the answer, yes, this made a great difference! Testing was much more successful.

However, sometimes the Tag shows in the ROS output, and at other times it isn't there. I see just two devices reporting through the ROS topics. What we need most of all is to be able to plug the USB into the active Tag and get it's location. This will be on the robot and assisting with location awareness. To listen to a passive device and then send that data to the robot will only slow down the process.

And I didn't see any output on the Rviz grid. It stays blank.

cliansang commented 2 years ago

Thank you for the answer, yes, this made a great difference! Testing was much more successful. You are welcome! It is great to know that your testing is getting better.

cliansang commented 2 years ago

However, sometimes the Tag shows in the ROS output, and at other times it isn't there. I see just two devices reporting through the ROS topics. What we need most of all is to be able to plug the USB into the active Tag and get it's location. This will be on the robot and assisting with location awareness. To listen to a passive device and then send that data to the robot will only slow down the process.

Your application seems to be used for a navigation purpose. Currently, this repo was designed to be used in a tracking scenario in mind. However, a few modifications on the script especially on the serial data processing part should do the trick. The reason is that the serial data coming into the USB from DWM1001 are slightly different based on whether the tag is acting as a listener node or an active node. We may also add a separate script for navigation purpose in the repo, but at a bit later time.

cliansang commented 2 years ago

And I didn't see any output on the Rviz grid. It stays blank.

Yes, it was part of the TODO list. I just committed what I have in mind to solve this issue by using custom ROS messages. However, the hardware setups regarding the UWB module are not with me at the moment. Therefore, the rvis part is untested yet in the current commit. So, I commented out the rvis related part in the launch file. But you are welcome to try it out and modify them. I'll be with the hardware in the weekend and able to confirm the process then.

The other ugly workaround at this state is to manually/explicitly subscribe the topics of your tags on "vizdwm1001.py" script. This is quite ugly, and I hope the above-mentioned approach works. rospy.Subscriber("/dwm1001/id/pose", PoseStamped, self.TagCallback)

Russ76 commented 2 years ago

Thanks for the answers! Yes, my needs are a bit different. I am happy to see that the slow operation was only caused by a wrong setting! I believe Decawave's default should be changed to disable stationary detection. Surely many customers have been frustrated by this "sleeping" tag!

I am trying to make a "teach and repeat" routine for an outdoor rover. It must be very precise, to centimeter accuracy. I have worked with "Husky Trainer" but it requires a very expensive 3D Lidar. Other teach and repeat repos aren't accurate. But the UWB tag sensor output can be used with the cmd_vel topic and clock and saved (during teach), then played back (for repeat). The camera images or point clouds may not be needed! The camera could be used to sense if something has moved in the way.

cliansang commented 2 years ago

And I didn't see any output on the Rviz grid. It stays blank.

I just would like to update that I did a quick test on visualization of multiple tags on RVIZ today, and it works as intended. The tags should show up on the RVIZ now.

Russ76 commented 2 years ago

Great to know, thanks! I will test that. I made two new versions of the main program. One can be plugged into active or passive tag and publish to ROS, and the other takes text file input to simulate the UWB network connection. It publishes to ROS the same as the regular program.

Russ76 commented 2 years ago

Yes, it worked for me now with tracking in Rviz. Very nice! It shows more hopping around than I anticipated.

Russ76 commented 2 years ago

Closed for now.