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

Stonefish ROS2: sensor fps is not the one requested #57

Open
JulietteDrupt opened this issue Nov 26, 2024 · 0 comments
Open

Stonefish ROS2: sensor fps is not the one requested #57

JulietteDrupt opened this issue Nov 26, 2024 · 0 comments

Comments

@JulietteDrupt
Copy link

JulietteDrupt commented Nov 26, 2024

Good afternoon,

Thank you for this powerful tool. I just noticed an issue when trying to parameterize camera fps when using ROS2.

Single camera
The sensor definition in the launchfile is as follows, with only one camera:

<sensor name="camera" rate="20.0" type="camera">
    <specs resolution_x="1200" resolution_y="800" horizontal_fov="90.0"/>
    <origin xyz="0.16 0.0 0.25" rpy="1.5707963267948966 0.0 1.5707963267948966"/>
    <link name="base_link"/>
    <ros_publisher topic="/bluerov/camera"/>
</sensor>

...but the command

 ros2 topic hz /bluerov/camera/image_color 

returns an average rate around 8 fps
image

So I tried to play with the frame rate parameter in the launch file. With rate="40.0", I get approx. 20 fps:
image

Stereo camera
The 2 cameras are defined as follows in the launchfile:

<sensor name="camera1" rate="20.0" type="camera">
   <specs resolution_x="1200" resolution_y="800" horizontal_fov="90.0"/>
   <origin xyz="0.16 -0.10 0.25" rpy="1.6 0.0 1.6"/>
   <link name="base_link"/>
   <ros_publisher topic="/bluerov/camera/left"/>
</sensor>
<sensor name="camera2" rate="20.0" type="camera">
   <specs resolution_x="1200" resolution_y="800" horizontal_fov="90.0" baseline="0.2"/>
   <origin xyz="0.16 0.10 0.25" rpy="1.6 0.0 1.6"/>
   <link name="base_link"/>
   <ros_publisher topic="/bluerov/camera/right"/>
</sensor>

Again, the published fps is not very consistent, and different for the 2 cameras: approx 15 fps for the left camera
image
and varying between between 9 and 14 fps for the right one
image

Thank you in advance for your help,
Best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant