1
$\begingroup$

I am trying to solve this issue on the gz-math repo. My initial approach was to make changes to CMakeFiles.txt inside gz-math and add a cpp code to convert a quaternion given in arguments to Euler Angles. However, this approach does not seem to work. The issue mentions the use of gz-tools or ign-tools and links a file as an example but I can't understand how to add a command line tool in that way. I would like the command usage to be like gz math --quaternion_to_euler "0 0 0 1". How should I proceed? I have the equations for converting quaternions to Euler angles, but how can I integrate the tool in the way required? The command gz does not currently have an option called 'math', so that has to be created too. And in the end, which directory do these changes happen in? gz-math or gz-tools?

$\endgroup$

1 Answer 1

1
$\begingroup$

The first step I'd take is to completely understand another gz command line tool.

https://github.com/gazebosim/gz-tools/

Each subcommand is implemented in a plugin that belongs to a specific Gazebo project. For example, all the commands that start with gz topic ... are implemented by the Gazebo Transport library.

Trace out the code from gz-tools to an existing implementation and then find the plugin for that implementation and you should be in good shape to sketch one for math.

The Gazebo Transport command line tools seem to be implemented by the files in https://github.com/gazebosim/gz-transport/tree/gz-transport13/src/cmd, for example.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.