Git Product home page Git Product logo

Comments (7)

MartyG-RealSense avatar MartyG-RealSense commented on July 21, 2024

Hi @samibouziri Are you using a URDF, please? If you are then the above image looks unusual for a D435. A D435 URDF should look like the one at #459 (comment)

image

from realsense-ros.

samibouziri avatar samibouziri commented on July 21, 2024

Yes I am using this urdf I am just enabling the visualization of the mesh and the corresponding collision box in the same picture to demonstrate the offset.
here is the mesh alone:
image
here is the collision box alone:
image
and here are the two overlapping:
image
Sorry for the confusion

from realsense-ros.

MartyG-RealSense avatar MartyG-RealSense commented on July 21, 2024

It's no problem at all. :)

The mesh image looks correct. base_link corresponds to the tripod screw thread on the base of the camera and camera_link corresponds to the center-line of the left infrared sensor on the front of the camera.

On RealSense cameras with a glass front such as D435, depth is measured from the front glass and not from the sensor inside the casing. The depth measurement is 0 at the glass front. To find the 'ground truth' value (the depth when measured from the sensor's lens) on a D435 camera, -3.2 (mm) is added to the depth measurement.

from realsense-ros.

samibouziri avatar samibouziri commented on July 21, 2024

I am not talking about the frames or the measurements. I am talking about the position of the collision box. The collision box of the camera should encompass the camera mesh which is not the case in the picture above.
The collision box should not be centered around the camera frame (x coordinate of the origin of the collision box 0) as the camera is not positioned in the center of the camera.
In other words when visualizing both the mesh and the collision box I am expecting to see something like this :
image
and not something like this:
image

from realsense-ros.

MartyG-RealSense avatar MartyG-RealSense commented on July 21, 2024

I have not seen this particular problem in past RealSense ROS cases, unfortunately.

Are you using ROS1 or ROS2? You linked to the ROS2 wrapper's D435 URDF. If you are using the ROS1 wrapper then it has a D435 URDF here:

https://github.com/IntelRealSense/realsense-ros/tree/ros1-legacy/realsense2_description/urdf

from realsense-ros.

samibouziri avatar samibouziri commented on July 21, 2024

I am using ROS1 but the problem should be the same for ROS2 since the URDFs are the same and the meshes are the same.
Anyway if you want to align the collision box with the mesh like shown just replace the collision tag which is now:

<collision>
        <origin xyz="0 ${-d435_cam_depth_py} 0" rpy="0 0 0"/>
        <geometry>
          <box size="${d435_cam_depth} ${d435_cam_width} ${d435_cam_height}"/>
        </geometry>
</collision>

by:

<collision>
        <origin xyz="${-d435_cam_depth / 2 + d435_zero_depth_to_glass + d435_glass_to_front instead} ${-d435_cam_depth_py} 0" rpy="0 0 0"/>
        <geometry>
          <box size="${d435_cam_depth} ${d435_cam_width} ${d435_cam_height}"/>
        </geometry>
</collision>

from realsense-ros.

MartyG-RealSense avatar MartyG-RealSense commented on July 21, 2024

It's great to hear that you achieved a solution. Thanks so much for sharing it!

from realsense-ros.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.