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

3D plot plugin system #332

Closed
wants to merge 2 commits into from

Conversation

luccosta
Copy link

@luccosta luccosta commented Sep 3, 2020

This PR is part of this issue #231 .

Initial upload with WIP. Really just the draft while understanding the Ignition structure.

Signed-off-by: Lucas Fernando lucas.costa@ee.ufcg.edu.br

Signed-off-by: Lucas Fernando <lucas.costa@ee.ufcg.edu.br>
@luccosta luccosta requested a review from chapulina as a code owner September 3, 2020 01:38
@luccosta luccosta marked this pull request as draft September 3, 2020 01:44
@chapulina chapulina added the 🏰 citadel Ignition Citadel label Sep 3, 2020
@chapulina chapulina added enhancement New feature or request GUI Gazebo's graphical interface (not pure Ignition GUI) rendering Involves Ignition Rendering labels Sep 3, 2020
Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

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

The file structure is looking good. I think the only thing missing is to add the plugin to the list, because right now it's not being compiled:

diff --git a/src/systems/CMakeLists.txt b/src/systems/CMakeLists.txt
index ab085ca8..89cf2333 100644
--- a/src/systems/CMakeLists.txt
+++ b/src/systems/CMakeLists.txt
@@ -84,6 +84,7 @@ add_subdirectory(joint_controller)
 add_subdirectory(joint_position_controller)
 add_subdirectory(joint_state_publisher)
 add_subdirectory(lift_drag)
+add_subdirectory(link_plot3d_plugin)
 add_subdirectory(log)
 add_subdirectory(log_video_recorder)
 add_subdirectory(logical_camera)

}

// Get params from SDF
this->dataPtr->jointName = _sdf->Get<std::string>("joint_name");
Copy link
Contributor

Choose a reason for hiding this comment

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

I recommend getting link_names instead. The joints by themselves are not very helpful to find points in the 3D space.

You could also support multiple links and expose other options like an offset from the link's origin and the material color. See what it looked like on Gazebo classic. Here, I recommend something like this:

      <plugin name='3dplot' filename='LinkPlot3DPlugin'>

        <!-- Update at 10 Hz -->
        <frequency>10</frequency>

        <!-- Upper link plot -->
        <plot>
          <link>double_pendulum_with_base::upper_link</link>

          <!-- Point 1m in +Z axis in link frame -->
          <offset>0 0 1</offset>

          <color>1 0 0</color>
        </plot>

        <!-- Upper link plot -->
        <plot>
          <link>double_pendulum_with_base::lower_link</link>

          <!-- Point 1m in +Z axis in link frame -->
          <offset>0 0 1</offset>

          <color>0 0 1</color>
        </plot>

      </plugin>
  • Using an offset vector instead of pose because we don't need rotation
  • Using color instead of material because Ignition doesn't support Ogre materials

Let me know if you have any questions!

@chapulina
Copy link
Contributor

Hi @luccosta , are you planning to keep working on this PR? Anything we can help with?

@luccosta
Copy link
Author

luccosta commented Dec 10, 2020

Hi @chapulina, I want to apologize for the absence, and I will return working on this PR in this weekend. :)

@chapulina
Copy link
Contributor

No worries, @luccosta, I was just checking in. Thanks!

@chapulina chapulina mentioned this pull request Jul 15, 2021
8 tasks
@chapulina
Copy link
Contributor

@luccosta , thank you for opening this PR. I needed the plugin for a project, so I'm porting it in #917.

I'm closing this PR, but you're welcome to contribute other plugins in the future 👍

@chapulina chapulina closed this Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏰 citadel Ignition Citadel enhancement New feature or request GUI Gazebo's graphical interface (not pure Ignition GUI) rendering Involves Ignition Rendering
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants