How to change the direction of a model hierarchy?

Typically: "How do I... ", "How can I... " questions
Post Reply
yrg
Posts: 5
Joined: 17 Jun 2020, 21:49

How to change the direction of a model hierarchy?

Post by yrg »

Image https://www.flickr.com/photos/189159416 ... ed-public/
I have a biped robot model in CoppeliaSim (Figure 1). The gait I designed for it is shown in Figure 2. My problem is that the unidirectional hierarchy won't make the gait work. For example, for the first two steps in the gait (moving the right foot forward), the base link should be the left foot, which means the hierarchy is from the left foot to the right foot. For the last three steps (moving the left foot forward ), however, the base of the hierarchy would be the right foot. Is there any way to solve the problem?

Thank you.

coppelia
Site Admin
Posts: 7967
Joined: 14 Dec 2012, 00:25

Re: How to change the direction of a model hierarchy?

Post by coppelia »

Hello,

you don't need to change the direction. What touches the floor doesn't mean that it needs to be at the base of the hierarchy. You can select the left foot as the base of the hierarchy, the right foot, the left leg, etc.

In your case, the best would be to chose what you specified as Link2 as the base of the hierarchy: in that case, you would have two branches starting from Link2, the first branch would be the left leg (or right), the second branch would be the right leg (or left).

Have a look at the existing humanoid models and their scene hierarchies.

Cheers

yrg
Posts: 5
Joined: 17 Jun 2020, 21:49

Re: How to change the direction of a model hierarchy?

Post by yrg »

Thank you for your reply. But the gait needs the orientation of the middle link (link 2) to be changed, which is different from the humanoid example. If link 2 is chosen to be the base, it's orientation would be constant. In that case, the two branches of the leg will be driven individually, from link 2 to each foot. However, for lifting and swinging the right foot, I intend to actuate both joint3 and joint2. On the other hand, for lifting and swinging the left foot, both joint2 and joint3 should also be actuated, but with an opposite hierarchy.

coppelia
Site Admin
Posts: 7967
Joined: 14 Dec 2012, 00:25

Re: How to change the direction of a model hierarchy?

Post by coppelia »

Sorry, I still don't get it. Either way it is doable: if lifting one leg you might have to specify positive angles, when lifting the other leg you might have to specify negative angles for the same joint. But except for that, you do not need to inverse the hierarchy. Have a look at the various mobile robot models in the library, that walk (either with two, four or six legs): if we had to reverse the hierarchy, that would be extremely complex to handle.

Cheers

Post Reply