Repository navigation
Conversation
youliangtan
left a comment
There was a problem hiding this comment.
@Yadunund Happy to review this. Drop down a few comments here
There was a problem hiding this comment.
can we support multiple images here?
The test code is located in here:
lerobot/tests/cameras/test_cameras.py
Lines 196 to 206 in a75d009
|
@youliangtan thanks a lot for the review. Correct me if i'm wrong, but the Which makes me wonder how the existing To handle tuples, I would imagine the implementation in This brings up the question again on whether we should have users include a separate Alternatively, we could have users configure a single "camera": ROS2CameraConfig([
{
"topic": "/camera/color/image_raw",
"fps": 30,
"width": 640,
"height": 480,
},
{
"topic": "/camera/depth/image_rect_raw",
"fps": 30,
"width": 640,
"height": 480,
},
]
),Then What do you think? |
Signed-off-by: Yadunund <yadunund@gmail.com>
for more information, see https://pre-commit.ci
f2ad7f6 to
5ccaaba
Compare
|
I went ahead with having a separate |
Signed-off-by: Yadunund <yadunund@gmail.com>
|
Good catch @Yadunund. I just checked the code, I think the realsense impl with Also, I think all cameras in the original lerobot code should derive from the abstract class Btw, feel free change this from draft to ready-to-review 👍 |
|
I’m working on the same feature as well. It would be great if our source code could contribute something to the development. |
|
I was planning on working on a Luxonix Oak Depth PR next week. This is a better approach. Nice! |
|
I starting working on the refactor of this PR to adapt to the new @masonhensley I think the cornerstone of ROS is standardizing interfaces for different classes of hardware so having a generic "ROS2" integration that works across different camera brands over these interfaces is likely more scalable as you've pointed out. Related, @ycheng517 has a PR open to command robots over ROS 2 control interfaces: #1280. That could also use some review / testing :) |
|
Thanks for the ROS 2 camera work! We’d prefer the ROS-dependent backend in a community camera plugin. Please coordinate with the ROS 2 integration discussion in #4368 and list the package on our third-party sensors page. Closing this native backend proposal. |
What this does
Capture images over ROS 2!
There are so many cameras with ROS 2 drivers! Support all of them in
lerobotwith a single camera type that this PR introduces!This PR introduced the
ROS2Camerawhich can be configured using theROS2CameraConfigclass.ROS2Camerasensor_msgs::msg::Imagemessage.image_array_to_pil_image)Example camera config:
See dataset recorded from Realsense and OakD cameras:
yadunund/test_ros2_cameraOther datasets and policies generated using this pipeline.
How it was tested
Start a ROS 2 camera driver, eg. Realsense
source /opt/ros/jazzy/setup.bash ros2 launch realsense2_camera rs_launch.py rgb_camera.color_profile:=640x480x30 depth_module.depth_profile:=640x480x30Start a ROS 2 camera driver, eg. OakD (depthai)
source /opt/ros/jazzy/setup.bash ros2 launch depthai_ros_driver camera.launch.pyUpdate
camerasdict in of the robot configs to include aROS2CameraConfigentries as described above. Remove the depth topics as this is not yet supported inimage_array_to_pil_imageSource ROS 2 and record an episode.
TODO