Development of a Meccannum wheel robot using ROS2 NAV2

Hi Team,

I am currently developing a ros2 nav2 capable meccannum wheel based robot inside isaac sim. But we are facing a little bit difficulty in developing the action graphs and ros functionality. Is there a better example than kaya gamepad to understand the holonomic drive. Also it would be great if you can throw some insights on developing functionalities based on ros2 nav2.

I have gone through the official documentation but need more clear picture on all these areas.

Attaching the action graph below to get a better idea about what I have done so far.

In the raw_usd_properties of the USD_Setup_Holonomic_robot we were not able to mention the joint names.Can you specifically mention what all parameters and changes I have to make while connecting the subscriber twist messages to the holonomic controller node.

Is it possible to do all this via python scripting?

Thanking you,
Rafi

Hi,

The USD_setup_holonomic_robot node is really only useful if you have a USD file of the robot that already includes all the necessary info. If you don’t, you are probably better off just input each parameter that’s needed for the controller separately. Or if you only have partial information in your USD, then you can connect some parts of the USD_setup_holonomic_robot nodes’ output to the controller and input the rest manually (using separate nodes). So for the joint names, you’ll need to use a couple “Constant Token” nodes to put in names, and then put them all in an array using a “Make Array” nodes, and put the output of that into the joint names parameter of the controller.

You twist messages should just be changing your joint velocity I assume. There should be examples in our ROS tutorial.

and yes, you can do all of this through Python scripting. But you’ll have to build the graph from scratch like shown here in our tutorial.

Hi @qwan,

Thanks for the quick reply. What all parameters should we include in the holonomic controller? .At present I have added the following input (Velocity commands for the vehicle only) and one output - Joint Velocity Command.

Completed Action Graph Image :

Warning in console after redesigning the action graph :

[Warning] [omni.usd] Warning: in SdfPath at line 97 of /buildAgent/work/ca6c508eae419cf8/USD/pxr/usd/sdf/path.cpp -- Ill-formed SdfPath <>: syntax error

Error in Console:

2022-11-08 06:57:29  [Error] [omni.graph] Tried to set a value on AttributeData 'inputs:jointNames' of type 'token' with incompatible data (Unable to cast Python instance to C++ type (compile in debug mode for details))
2022-11-08 06:57:29  [Error] [omni.graph] AttributeError: Attempted to get array size of non-array attribute inputs:jointNames
2022-11-08 06:57:29  [Error] [omni.graph] 
2022-11-08 06:57:29  [Error] [omni.graph] At:
2022-11-08 06:57:29  [Error] [omni.graph]   /home/rafistark/.local/share/ov/pkg/isaac_sim-2022.1.1/kit/exts/omni.graph/omni/graph/core/_impl/attribute_values.py(202): get_array_size
2022-11-08 06:57:29  [Error] [omni.graph]   /home/rafistark/.local/share/ov/pkg/isaac_sim-2022.1.1/exts/omni.isaac.core_nodes/omni/isaac/core_nodes/ogn/OgnIsaacArticulationControllerDatabase.py(110): jointNames
2022-11-08 06:57:29  [Error] [omni.graph]   /home/rafistark/.local/share/ov/pkg/isaac_sim-2022.1.1/kit/exts/omni.graph/omni/graph/core/_impl/database.py(529): __setattr__
2022-11-08 06:57:29  [Error] [omni.graph]   /home/rafistark/.local/share/ov/pkg/isaac_sim-2022.1.1/exts/omni.isaac.core_nodes/omni/isaac/core_nodes/ogn/OgnIsaacArticulationControllerDatabase.py(219): initialize

Regards,
Rafi

For the holonomic controller, in addition to the desired vehicle velocity, you also need information about the wheels and wheel configuration. We are assuming that you are using omniwheels or mecanum wheels to achieve holonomic drive, so depending on how the wheels are positioned and property of the wheels, the actual speeds of the individuals wheels are going to be different than the overal speed of the vehicle. So in order to be able to calculate the individual wheel speed, we need, at minimum, the wheel radius, positions and orientations (relative to center of mass of the vehicle), the mecanum angles of each wheel, and then the overal desired velocity of the vehicle.

You can use the Kaya robot in our example as a reference. Use the usd_setup_holonomic_robot node to read out all the properties I just listed and see if they made sense to you.

Hi @qwan ,

Thanks for the quick response. How can we use the usd_setup_holonomic_robot node , can you please explain that step.I didn’t get you there, how will I be able to retrieve the data using that connection?

Regards,
Rafi

The usd_setup_holonomic_robot node is just reading straight from the USD file, so if your robot’s .usd has all the necessary properties, then that node will work and you’ll get useful information out of it. If you don’t have all the necessary information already embedded in your USD file, then that node is not useful. And you are better off just feeding in the individual properties manually into the holonomic_controller node and skip the setup node.

If you want to modify your USD file to contain the necessary information, you can save our kaya.usd file as a .usda file format. Usda files are human readable, so you can search for “mecanumwheel” (and other properties I listed as necessary) inside the usda file and see how they are laid out, and mirror those in your own USD files. You can also use the python interface for USD files to add those properties. The latter method is more systematic and takes a little more effort to get familiar with usd python apis.

I would start out with feeding those properties manually into the holonomic_controller first to just get your robot moving.