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

[ROS 2]: Add Python bindings #239

Open
wants to merge 3 commits into
base: ros2
Choose a base branch
from

Conversation

JafarAbdi
Copy link
Collaborator

Doesn't include the imarker_simple & tf_visual_tools

@auto-assign auto-assign bot requested a review from mamoll May 28, 2023 11:26
@JafarAbdi JafarAbdi requested a review from MarqRazz May 28, 2023 11:27
@JafarAbdi
Copy link
Collaborator Author

I'm adding python binding support for https://github.com/ros-planning/moveit_visual_tools, too! I think we should wait till that one is open before merging this

@codecov
Copy link

codecov bot commented May 28, 2023

Codecov Report

Merging #239 (648da88) into ros2 (4fe7735) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             ros2     #239   +/-   ##
=======================================
  Coverage   19.77%   19.77%           
=======================================
  Files           5        5           
  Lines        1795     1795           
=======================================
  Hits          355      355           
  Misses       1440     1440           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link

@MarqRazz MarqRazz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your amazing @JafarAbdi! Great work!!

So I'm testing with my Isaac Moveit Tutorials container with FastDDS and I can run the CPP version but when I run the python one all of the markers are not displayed.
image

My guess is that it's publishing them to fast and so some of the messages are getting dropped. It would also be nice if the program printed the same messages that the cpp one does...

[INFO] [1685366840.171581769] [rviz_demo]: Visual Tools Demo
[INFO] [1685366840.182038056] [rviz_demo.remote_control]: RemoteControl Ready.
[INFO] [1685366840.182133101] [rviz_demo.remote_control]: Waiting to continue: Click 'Next' using the RvizVisualToolsGui dashboard!
[INFO] [1685366843.289869795] [rviz_demo.remote_control]: ... continuing
[INFO] [1685366843.289923438] [rviz_demo]: Displaying range of colors red->green
[INFO] [1685366843.290541635] [rviz_demo]: Displaying Coordinate Axis
[INFO] [1685366843.294327666] [rviz_demo]: Displaying Arrows
[INFO] [1685366843.294759165] [rviz_demo]: Displaying Rectangular Cuboid
[INFO] [1685366843.294861810] [rviz_demo]: Displaying Lines
[INFO] [1685366843.294977992] [rviz_demo]: Displaying Cylinder
[INFO] [1685366843.295385687] [rviz_demo]: Displaying Axis Cone
[INFO] [1685366843.296057292] [rviz_demo]: Displaying Wireframe Cuboid
[INFO] [1685366843.296528497] [rviz_demo]: Displaying Sized Wireframe Cuboid
[INFO] [1685366843.296853348] [rviz_demo]: Displaying Planes
[INFO] [1685366843.296942797] [rviz_demo]: Displaying Labeled Coordinate Axis
[INFO] [1685366843.297532080] [rviz_demo]: Displaying Multi-Color Path
[INFO] [1685366843.298282520] [rviz_demo]: Displaying ABCD Plane
[INFO] [1685366843.299060577] [rviz_demo]: Testing sizes of marker scale
[INFO] [1685366843.299182731] [rviz_demo]: Shutting down.

And a cherry on top if it subscribed to the GUI panel and asked the user to press next.

def rviz_viz_tools_gui_callback(self, msg: Joy):
        """
        Callback for the rviz_visual_tools_gui that checks if "Next" was pressed.
        """
        if msg.buttons[1] == 1:  # The Next button
            self.next_ = True

@JafarAbdi
Copy link
Collaborator Author

So I'm testing with my Isaac Moveit Tutorials container with FastDDS and I can run the CPP version but when I run the python one all of the markers are not displayed. image

My guess is that it's publishing them to fast and so some of the messages are getting dropped. It would also be nice if the program printed the same messages that the cpp one does...

Thanks for testing! I think that's expected, the demos aren't the same, I was so lazy to port the whole demo to python :D :D

@MarqRazz
Copy link

If your busy lets just add a single print to the program saying it sent the markers for display. Right now the program just returns without letting the user know anything.

@JafarAbdi
Copy link
Collaborator Author

If your busy lets just add a single print to the program saying it sent the markers for display. Right now the program just returns without letting the user know anything.

Should be fixed now

Copy link

@MarqRazz MarqRazz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the info messages back into the console. I tested again and it's working great!

@@ -0,0 +1,144 @@
#!/usr/bin/env python3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a note here and in the README that the python demo shows a smaller example of the displayable shapes (compared to the cpp version) in Rviz so users don't think it's missing stuff.

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

Successfully merging this pull request may close these issues.

None yet

2 participants