Skip to content
This repository has been archived by the owner on Nov 26, 2020. It is now read-only.

What are the addCompound's parameter? #34

Open
WatsonZhouAnda opened this issue Dec 26, 2019 · 2 comments
Open

What are the addCompound's parameter? #34

WatsonZhouAnda opened this issue Dec 26, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@WatsonZhouAnda
Copy link

Hi, when I try to use the API "addCompound" in World.hpp to create "Compound" object, I have no idea about its parameter. The reason I want to create this object is that I want to create a "slope" or "wall" or "gap" terrain in order to train in raisimGym.

Compound *addCompound(const std::vector<Compound::CompoundObjectChild> &children,
                        double mass,
                        const Mat<3, 3>& inertia,
                        CollisionGroup collisionGroup = 1,
                        CollisionGroup collisionMask = CollisionGroup(-1));

Well, I mean what kind of type Compound::CompoundObjectChild is? I have seen in your Compound.hpp. It used the reference to a list while there is no notation about this "list"

struct CompoundObjectChild {
    ObjectType objectType;
    Vec<4> objectParam;
    std::string material;
    Transformation trans;
  };
  Compound(const std::vector<CompoundObjectChild>& list, double mass, Mat<3,3> inertia);

So, what "list" should I give? Maybe a urdf path? I have no idea and hope for your reply ASAP.
Thanks in advance.
@jhwangbo @tomlankhorst @vastsoun

@jhwangbo
Copy link
Contributor

Hi Watson. The documentation is lacking for that method. But for terrain, you can just create multiple static objects. There is no reason to use a compound object.

I'll update the documentation and add an example of a compound object after my break

@WatsonZhouAnda
Copy link
Author

got it, thank you!

@jhwangbo jhwangbo added the enhancement New feature or request label Mar 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants