Open clalancette opened 7 years ago
I'm interested in this (or more generally, getting astra camera to work with the latest ros 2 version) but I'm pretty new to this kind of thing and don't know where to begin. If you could provide some guidance, maybe I can do some of the legwork?
So there are two fairly large pieces of work that probably need to be done here:
ExternalProject
call in here to point to the occipital repository.AstraDriver
class should end up becoming a sub-class of rclcpp::Node
, rather than having the node passed in. This will allow it to become composable (which is particularly important for a driver like this).ROS_{WARN,ERROR,INFO,DEBUG}
with their RCLCPP counterparts.I know that is a bit hand-wavy, but its kind of the best I can do for now. If you want to look at a reasonably complex driver that does most of this, take a look at https://github.com/ros-drivers/velodyne/tree/dashing-devel .
If you do decide to do any of this work, I'm happy to do reviews and help merge them. But unfortunately I won't have any time of my own to work on this.
Thanks for the write up. I'll give it a shot. For Step 1, I think I need to understand the issues with the upstream driver better but I can probably figure it out by exploring those OpenNI2 repositories. Then Step 2 seems fairly straight forward and doable.
Looks like the https://github.com/occipital/OpenNI2 repo is in a similar state... tons of unmerged pull requests :|
I was able to compile OpenNI2 on Ubuntu 18.04 with gcc 7.4 from this repo https://github.com/uncc-visionlab/OpenNI2 which is where that orbbec/OpenNI2#6 request originated. Maybe we could just use it as the ExternalProject
?
I'll try to proceed with Step 2 using it.
One remark I'd like to vocal here is that I think that a camera driver (in fact all drivers) with heavy load messages should actually be a rclcpp_lifecycle::Node
instead of a regular node. I could see quite some benefits from having the opportunity to easily start/stop the publishing of these images or pointclouds.
Progress update: I've taken an approach of taking https://github.com/lukaszmitka/ros_astra_camera, which works on Dashing, and porting it to Eloquent. I have it compiling without error, all boost dependencies removed and converted to std. I can plug in my camera, run the node, and echo the topics and data seems to be coming through. I tried to sub to the /image topic with image_tools/showimage but that hung forever.... I also need to refactor stuff and make it look like an actual ros2 Eloquent package based on components etc. (steps 2.iii through iv)
Excellent, thanks for the progress update.
I just realized that I have one of these in my office, so I may be able to help test when it comes to that point.
Yep, same here, I have one sitting around that I could use for testing.
Hi all, I have a robot with an Astra Pro that I would like to port to ROS2. I am happy to contribute, but I would like to understand what is the current status of this package.
It still needs the steps I outlined in https://github.com/ros2/ros_astra_camera/issues/19#issuecomment-572817308 . I've been taking some time to improve the backend OpenNI2 driver (here), but that is going slowly (I'm working on it in my spare time). Other than that, this driver is still pretty old, and so would need a bunch of work to make it work properly on modern ROS 2.
Hey all, I haven't made any more progress on this due to combination of me being a noob in this space and I haven't had the time to invest to learn and continue to try.
@clalancette thanks for the work you are doing with OpenNI2, the last time I had to deal with it, it was a nightmare. I also opened an issue on the original repo (the ROS1 version of the driver) to understand if they have any plan to do an official port to ROS2. Especially considering they have been somewhat active there (this repo is now 100 commits behind). It could be worth it to start again from there to build the ROS2 driver.
Hello guys, I just opened a PR #31 with the latest updates I made to compile the driver in ROS2 Foxy. I also merged the latest contributions of the original ORBEC repo to ensure my ASTRA PRO cameras would be working as well as in their ROS1 launch file.
This is not yet the case... I have issues with OpenNI and its callbacks. When running the node or the launch file I have these messages of corruption:
...
[astra_camera_node-1] 6441291 WARNING Read: Depth buffer is corrupt. Size is 511856 (!= 512000)
[astra_camera_node-1] 6466764 WARNING Depth Frame Buffer overflow! current size: 511856
[astra_camera_node-1] 6466786 WARNING Depth frame is corrupt!
...
In order to debug it I reintegrated the test file test_wrapper.cpp
only to learn the issues are the same in it and the callbacks are never called.
...
6048785 WARNING Read: Depth buffer is corrupt. Size is 511856 (!= 512000)
6072781 WARNING Depth Frame Buffer overflow! current size: 511856
6072793 WARNING Depth frame is corrupt!
...
Number of called to IRCallback: 0
Number of called to ColorCallback: 0
Number of called to DepthCallback: 0
To my surprise the ROS1 version of the test file results in the same messages and errors, although their astrapro.launch
works perfectly.
If anyone have insights on how to tacke this issues, I'd appreciate very much.
PS: I still haven't managed to integrate and test the improved version of OpenNI from @clalancette . I can try to do it if it can improve the node and fix these issues.
The whole of the astra driver really needs to be revamped for ROS2. It is fairly ugly right now, doesn't follow best practices, and has a lot of code commented out. We should probably start by cleaning up the upstream orbbec driver in ROS1, then proceed to fix up the ROS2 version of it.