0
$\begingroup$

Gazebo Answers logo

I'm looking for a way to define values of the metric grid like unit size, number of cells, etc. much in the same way it can be specified in RViz.

I've seen it mentioned here and there but never with a concrete xml example. Some say use 3DGrid, some say it's outdated and grid config is the way to go, but neither give any examples. Which one should be the correct one in Fortress?

Thanks.


Originally posted by MoffKalast on Gazebo Answers with karma: 13 on 2022-10-06

Post score: 0

$\endgroup$

2 Answers 2

0
$\begingroup$

Gazebo Answers logo

Hi Moffkalast, I hope this helps you!

See the video here

youtube

This is all gui using this example: https://github.com/gazebosim/gz-sim/blob/gz-sim7/examples/worlds/grid.sdf

So, with the xml concrete, it would be like this:

<grid>TRUE OR FALSE</grid> 

at the moment.

But I just did a quick look into the service. The service is

ign service -i -s /world/grid/gui/info

You can update ignition.msgs.GUI the setting during runtime using python (through ros2 or command line) or c++ (I dont know how since i dont use c++)

Hope this help you to find your route with this. If you found the better example, please share it on here!


Originally posted by kakcalu13 with karma: 87 on 2022-10-08

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by MoffKalast on 2022-10-10:
Ah thanks, I did later on do some more searching and found the 3D grid example you're referring to in one of the update logs and managed to <insert> an additional custom grid, but I'm still not entirely sure how to disable the default one.

So where exactly should the <grid>false</grid> go? I've tried it under <world>, <gui> and both the view and grid plugins and <ignition-gui> and none of it has any effect. Where did you find the reference to that?

Comment by kakcalu13 on 2022-10-24:
Hi,

Sorry that it took me so while to answer. I wasn't notified by your question! So, as for the <grid>false</grid> will be under <scene></scene> and it will be under <world> so it should be <world><scene><grid>false</grid></scene></world>

Let me show you the extra trick: Use this for your reference in future

http://sdformat.org/spec?ver=1.9&elem=scene

Click on <scene> and you can see where grid should be placed in.

$\endgroup$
0
$\begingroup$

Gazebo Answers logo

For reference, so far my grid adding xml is the following:

    <gui fullscreen='false'>
        <plugin name='Grid config' filename='GridConfig'>
            <ignition-gui>
                <title>Grid Config</title>
            </ignition-gui>
            <insert>
                <!-- total size = length * cell count-->
                <horizontal_cell_count>60</horizontal_cell_count>

                <!-- 0 actually means one plane-->
                <vertical_cell_count>0</vertical_cell_count> 

                <!--5m cells-->
                <cell_length>5.0</cell_length> 

                <pose>-90 75 0  0 0 0</pose>
                <color>1 1 1 0.7</color>
            </insert>
        </plugin>

    </gui>

Originally posted by MoffKalast with karma: 13 on 2022-10-10

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

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