Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue concerning simulation in choreonoid and importing new robot in the walking controller #47

Open
petrosgar21 opened this issue Jan 30, 2023 · 2 comments

Comments

@petrosgar21
Copy link

Hello,
I managed to run the lipm walking controller with the JVRC1 robot only in the rviz environoment through the mc_rtc ticker (runs perfectly without errors) because i have some problems when running the simulation in choreonoid, caused through the fact that there are some problems when building the mc_openrtm and finding the openrtp repository. (if there is information about finding the openrtp repository i would kindly ask for it) However, i think this is not necessary for my case as i want to integrate a new robot and run with it the walking controller. So, i wanted to ask what is the usage of the simulation in choreonoid and if it is necessary for running the controller even with another robot, although right now it runs completely fine only in rviz. The new robot is already integrated in the mc_rtc and tested with a simple controller. My question is how i could integrate the new robot to the walking controller. I searched how the robot parameters are included in this version of the controller and tried to change the etc/LIPMWalking.in.yaml file by including the new robots parameters but it produced the error what(): No frame named in reemc caused from the /include/mc_rbdyn/Robot.h file from the mc_rtc repo. So i wanted to ask since this error is happening only by running the lipmwalking controller and not other mc_rtc controllers if there is another way for the controller to add the robot's parameters.

Thank you very much in advance.
(Btw sorry if this issue is shown twice, my previous account was flagged for some reason)

@arntanguy
Copy link
Collaborator

Hi,

You can integrate a new robot using mc_rtc_ticker. In that case you simply won't have any sensor feedback, and thus the stabilizer is doing nothing (and its gains are irrelevant).

The controller assumes that a LeftFoot, RightFoot, LeftFootCenter, RightFootCenter surfaces are defined for the robot. These are defined in the robot description package in the rsdf folder. Look into catkin_data_ws/src/mc_rtc_data/jvrc_description/rsdf/jvrc1/L_ANKLE_P_S.rsdf for a sample surface.

  • The [Left|Right]Foot surfaces represent the largest rectangular support area you can define under the robot's sole. It is centered under the ankle joint.
  • The [Left|Right]FootCenter surfaces are the the same as the above surfaces, but centered in the middle of the rectangular surface area instead ("foot center").

You also need to define the following parameters in the configuration:

robot_models:
  reemc:
    sole:
      half_length: 0.108
      half_width: 0.07
      friction: 0.7

And you will need to define suitable walking plans for your robot:

reemc:
    ashibumi: # stepping in place
      double_support_duration: 0.2
      single_support_duration: 0.8
      swing_height: 0.04
      contacts:
        - pose:
            translation: [0.0, -0.105, 0.0]
          surface: RightFootCenter
        - pose:
            translation: [0.0, 0.105, 0.0]
          surface: LeftFootCenter
        - pose:
            translation: [0.0, -0.105, 0.0]
          surface: RightFootCenter
        - pose:
            translation: [0.0, 0.105, 0.0]
          surface: LeftFootCenter
        - pose:
            translation: [0.0, -0.105, 0.0]
          surface: RightFootCenter
        - pose:
            translation: [0.0, 0.105, 0.0]
          surface: LeftFootCenter
        - pose:
            translation: [0.0, -0.105, 0.0]
          surface: RightFootCenter
        - pose:
            translation: [0.0, 0.105, 0.0]
          surface: LeftFootCenter
        - pose:
            translation: [0.0, -0.105, 0.0]
          surface: RightFootCenter
        - pose:
            translation: [0.0, 0.105, 0.0]
          surface: LeftFootCenter
        - pose:
            translation: [0.0, -0.105, 0.0]
          surface: RightFootCenter
        - pose:
            translation: [0.0, 0.105, 0.0]
          surface: LeftFootCenter

Once you get this working, we can look into solving your choreonoid installation issue.

@petrosgar21
Copy link
Author

Thank you @arntanguy for the speedy answer,
The thing is i already have provided the rsdf files and edited the configuration file of the controller (LIPMWalking.in.yaml) to be just like you have it. (added reemc as a new robot in the robot_models and provided the plan). As a result i can see when running the mc_rtc_ticker that the surfaces are successfully loaded and i provide the needed surfaces LeftFoot, RightFoot, LeftFootCenter, RightFootCenter. The thing is i still get the what(): No frame named in reemc error. So my question is do i need to define somewhere the frames of the robot specifically for the walking controller? Because i already managed to run another mc_rtc controller and i thought i have properly included the reemc robot in the mc_rtc framework.
Best regards!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants