-
Notifications
You must be signed in to change notification settings - Fork 102
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
ROS2 workspace and example nodes #256
Conversation
Hey @ad-daniel, i have started working on implementing ROS2 nodes for object detection and semantic segmentation. Should i keep adding the new stuff on the |
Ideally it would be better to merge a minimal version (with some changes like adding vision_opencv as a submodule, re-organize some stuff, ...) so that other partners can do their own branches from develop and begin the development in parallel. In practice however since develop is currently frozen in preparation for the release, we should probably wait for that (either way it will occur this week). For you and others that wish to begin the ros2 development I think the best approach at the moment might be to create a branch from THIS branch. Once the release has occurred, we can do the necessary changes in this PR and merge it right after. |
Alright Daniel, thanks! I also thought that might be a good potential way of doing things. |
@tsampazk thanks for your detailed instructions. |
Hey @vniclas ! Could you run this |
The tests as described in the vision_opencv/cv_bridge readme pass. Sadly, I cannot run your proposed command due to the same error |
On my earlier deleted response i had some things mixed up, sorry, this is actually unrelated to vision_opencv. Maybe if you still have the original installation of the toolkit saved, you try this If even the above doesn't work maybe you missed the steps in the ROS2 installation regarding the keys, etc.:
from here steps 2 and 3 in the second section regarding ROS2 foxy installation. If you get errors building the toolkit from scratch should be unrelated with this indeed. |
Running |
…n nodes (#273) * Added to and from ros boxes bridge methods * Added object detection 2d ssd node according to ros1 node * Added object detection 2d centernet node according to ros1 node * Added to and from bounding box list bridge methods * Added object detection 2d detr node according to ros1 node * Fixed some issues with type conversions in bridge * Added object detection 2d yolov3 node according to ros1 node * Added face detection retinaface node according to ros1 node * Added retinaface ros2 node in setup.py * Added semantic segmenation bisenet ROS2 node according to ROS1 node * Added additional checks in learner download methods to stop redownloading * Improved ROS2 packages names and bridge import * Tester moved * Changed bridge import and fixed some nms stuff causing errors * Changed bridge import and made all queues 1 to avoid delays * Minor pep8 fix * Another minor pep8 fix * Added licence check skip for setup.pys * Added licence check skip for test.pys * Added appropriate docstring on existing bridge methods * Removed unused commented line * Finalized ROS2 pose estimation node with argparse * Minor formatting * Finalized ROS2 bisenet semantic segmentation node with argparse * Improved docstring * Minor comment addition * Finalized ROS2 face detection retinaface node with argparse * Minor improvements * Finalized ROS2 object detection 2d yolov3 node with argparse * Finalized ROS2 object detection 2d centernet node with argparse * Finalized ROS2 object detection 2d detr node with argparse * Finalized ROS2 object detection 2d ssd node with argparse * Fixed typo in package.xml description Co-authored-by: Stefania Pedrazzi <stefaniapedrazzi@users.noreply.github.com> Co-authored-by: Stefania Pedrazzi <stefaniapedrazzi@users.noreply.github.com>
* Fixed wrong argparse default values * Some reordering for internal consistency and to/from face/face_id * Initial version of ROS2 face recognition node * Added annotated image publishing to ROS2 face recognition node * Fixed face recognition node class name * Fixed face recognition node class name in main * Added ROS2 fall detection node * Detr node now properly uses torch
These are not OpenDR files so they contain their own licenses, which we shouldn't change. I think we could just delete them altogether, or add exceptions in the license testing as seen here for the simulation package also. Nevertheless, i think that we shouldn't put our own license on those files, as they are not are own. |
@tsampazk You are right, I didn't notice you added exceptions in checking the OpenDR licence to those files. |
As for the failure, from the error code it seems we are running once again out of RAM. I believe this tool was extended recently, which means two tests are occurring in the same job. We might need to split them further in the future |
Co-authored-by: ad-daniel <44834743+ad-daniel@users.noreply.github.com>
This reverts commit dae3cde.
You beat me to it Daniel, thanks for the audio installation! 😆 I am now making the required changes in the readme. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me, thank you!
This PR should be reviewed in priority so that I can finalize #353 before synchronizing on master. Some missing dependencies were shadowed by the fact the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall seems fine to me! Thank you all for the hard work!
This PR contains a new ROS2 (Foxy-Fitzroy version) workspace located in the
projects
directory and, for now, it serves totest and finalize the structure, naming, etc.,gather and finalize all ROS2 nodes in a unified PR. Right now there are nodocstrings(docstrings added), documentation or READMEs. This description will get updated for any additions.Contents:
opendr_perception
python packageContains a subscriber tester node (tester), that subscribes to the messages published by the pose estimation node forTesting can be performed as described in steps 9 and 10 of Building and Running below.testing
opendr_ros2_bridge
python packagebridge.py
which includes a class with methods to convert images, poses, etc. from and to ROS2 messagescv_bridge
which is included in thevision_opencv
packageopendr_ros2_messages
CMake packageOpenDRPose2D
andOpenDRPose2DKeypoint
The logic behind the structuring of the packages and nodes is similar to OpenDR's ROS1 packages/nodes.
Below you can find instructions to install, build and run the nodes for testing. Note that i did everything on a system with ROS1 already installed.
I faced many issues along the way that might reappear in a fresh install of ROS2, etc., so if any problems/errors occur following the instructions please get in touch with me, to possibly save you some time.
Installation
dashing
withfoxy
)sudo apt-get install ros-foxy-vision-msgs
as discussed belowsudo apt install python3-colcon-common-extensions
ros2 run usb_cam usb_cam_node_exe
to run it after installation, which seems to work fineBuilding and Running
opendr_ws_2
directorycv_bridge
via the instructions in its README, excluding the last step(build). There seems to be no need to build it, as it will get built along with the rest of the packages later.opendr_ws_2
) as the previous step leaves you insidevision_opencv
dircolcon build
. install/setup.bash
ros2 run opendr_perception pose_estimation
to start the pose estimation node (or any other existing node)ros2 run usb_cam usb_cam_node_exe
to grab images from a webcamros2 run rqt_image_view rqt_image_view
and select the corresponding topic to view the image resultros2 topic echo opendr/poses
to view the pose message. Note that it is not really human readable in that form, it should be read in another node and converted into an OpenDR pose object to have access to human-friendly print methods.* If you are using conda, check out Illia's comment down below. Thanks @iliiliiliili !
To be added
ROS2 nodes to be added according to what ROS1 nodes exist already:
Perception package:
ros2
branch)ros2
branch)I will directly add theWIP ROS2 node onros2
branch)ros2
branch)Data generation package:
Simulation package:
Planning package:
Ros nodes e2e planner #286, new PR will be opened for ROS2ROS2 node for e2e planner and environment upgrade to Webots R2022b #358)Edit1: Updated the last steps of the instructions as well as the contents list as per the latest changes.
Edit2: Added information in contents list about the new
opendr_ros2_messages
. added TODO list for remaining nodes