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

ODCL node on vehicle #54

Open
rland93 opened this issue May 4, 2022 · 4 comments
Open

ODCL node on vehicle #54

rland93 opened this issue May 4, 2022 · 4 comments
Assignees
Labels
enhancement New feature or request odcl Object Detection, Classification, and Localization ROS

Comments

@rland93
Copy link
Member

rland93 commented May 4, 2022

Once an ODCL is found by the pipeline, it needs to be published. We need a node that runs on the vehicle, which:

  • Takes a picture with the camera
  • Runs the pipeline on the picture
  • Gets the ODCLs from the pipeline and parses them into a ROS message
  • Publishes the ROS message to a topic**

It will do all of this in a loop as quickly as possible while the node is running.

** They do need to be also serialized with MAVROS. Not sure how that works yet.

@rland93 rland93 added enhancement New feature or request odcl Object Detection, Classification, and Localization ROS labels May 4, 2022
@rland93 rland93 added this to the 0.2.0 milestone May 4, 2022
@rland93 rland93 self-assigned this May 4, 2022
@rland93
Copy link
Member Author

rland93 commented May 5, 2022

To be clear, the node that does this will still be in ROS (or, ROS-dev), not in a separate branch or repo.

We will git clone ROS-dev onto both the ground and the vehicle, and we can just run the ground-based nodes on one and the vehicle nodes on the other.

dangthanhan507 added a commit that referenced this issue May 20, 2022
@rland93 rland93 removed this from the 0.2.0 milestone May 24, 2022
@rland93
Copy link
Member Author

rland93 commented May 26, 2022

Going to change how data is returned from pipeline.run list -> dict

@rland93
Copy link
Member Author

rland93 commented May 26, 2022

@dangthanhan507

Does cv.VideoCapture() capture a video stream or still images? I notice that the resolution is being set manually.

Video streams are almost always lossy compressed by the on-board video coprocessor -- there's usually no way to get the "raw" video stream, only the downscaled and lossy h264, which is a very poor substitute (ie 1080/720p instead of 4000x3000 or whatever)

Since we are using the tiler, we will want to be working with images -- NOT the lossy video.

If it's a video stream, that will need to be changed to captureImage(), if openCV has such a functionality. Or else, we will need to figure out how to capture image directly to file and then read the image file statefully from inside of our script.

Cameras usually limit the number of pictures that can be taken per second so that the on-camera image chips don't heat up too much. For us, that's not likely to be an issue, since the inference rate for a tiled image is somewhere around 1hz.

@dangthanhan507
Copy link
Member

@rland93 There are no signs that VideoCapture performs lossy compression when we poll images from camera. cv2.VideoCapture(0) reads from the linux file /dev/video0 which is location of camera sensor if it has been identified on computer.

It might be confusing because there's a lot of terms like "video" thrown around, but I think opencv just means capturing image sequences whether live or from a file that contains image sequences. We are not reading from any files, so we should be good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request odcl Object Detection, Classification, and Localization ROS
Projects
None yet
Development

No branches or pull requests

2 participants