GithubHelp home page GithubHelp logo

Comments (4)

roym899 avatar roym899 commented on June 9, 2024 1

That would be awesome. It would require extending rerun_ros_interface.cpp and adding the corresponding subscriber factory method to the visualizer node.

I am currently porting the bridge to ROS 2 and will also work on adding support for more of the standard types once that is done.

from cpp-example-ros-bridge.

roym899 avatar roym899 commented on June 9, 2024 1

That looks great!

  • I'm not sure what the problem with the arrow is. This kind of flattening might suggest that the rotation matrix isn't actually a proper rotation matrix (?). If you provide a 3x3 matrix to Rerun it will apply it as a linear transformation.
  • Like you say, right now the best bet is to generate a Mesh3D to get cylinders (see rerun-io/rerun#1361).
  • I think for now just having the wireframe for the boxes is okay; I think showing / hiding faces of Box3D should be supported in Rerun; I'll open an issue for this in the main repo
  • Adding a Rerun transform for the pose seems like the right approach (and should be applicable to all marker types) 👍

from cpp-example-ros-bridge.

lucasw avatar lucasw commented on June 9, 2024

Here's what I have so far:

2024_04_15_rviz_markers_in_rerun

https://youtu.be/95s8YK3x8f0

rosrun visualization_marker_tutorials example_marker_array.py
rosrun rerun_bridge rerun_marker.py
  • The Arrow isn't rotating properly, but I haven't looked into it much (possibly that rotation matrix is bad)- any suggestions to fix it are welcome. Also am I squashing it flat? Having the rviz marker control over the length of the tip and shaft and tip base radius would be nice, but not super important to anything I'm doing. There's another mode where the rviz arrow is defined by start and end points and I'll try that next, I expect it will work better.

  • There's no cylinder primitive so it would have to be generated as a Mesh3D, not too hard but rerun support would be nice.

  • Have rerun generate triangle flat face normals if not provided, could be optional.

  • Optional support for faces on boxes instead of the wireframe? Or I could generate a box Mesh3D instead.

  • marker.pose.orientation is ignored for many types (though I never use it with any of the list marker types, I would instead make a parent ros transform handle it)- but adding a rerun transform for it seems like it would work.

I could take a look at adding any of the above that apply to the core rerun.

After fixing the arrows I can look at moving some of this to the bridge.

from cpp-example-ros-bridge.

lucasw avatar lucasw commented on June 9, 2024

I did create a rerun transform per marker, arrows are looking good and it turned out I did have a few cases of other marker types setting orientation so those all work now too.

def ros_pose_to_rr_transform(pose: Pose) -> rr.Transform3D:
    t = pose.position
    translation = [t.x, t.y, t.z]
    q = pose.orientation
    rotation = rr.Quaternion(xyzw=[q.x, q.y, q.z, q.w])
    return rr.Transform3D(translation=translation, rotation=rotation)
...
rr_transform = ros_pose_to_rr_transform(marker.pose)
rr_name = f"{parent_frame}/{marker.header.frame_id}/{marker.ns}/{marker.id}"
...
rr.log(rr_name, rr_transform)

from cpp-example-ros-bridge.

Related Issues (1)

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.