start-jsk / rtmros_gazebo

gazebo simulation for rtmros robots
8 stars 24 forks source link

Enable samplerobot sample in kinetic #246

Closed Naoki-Hiraoka closed 4 years ago

Naoki-Hiraoka commented 4 years ago

In kinetic, we have to set use_velocity_feedback to false (because https://github.com/start-jsk/rtmros_gazebo/pull/245).

After setting use_velocity_feedback to false, we have other problems in simulating samplebot.

roslaunch hrpsys_gazebo_general gazebo_samplerobot_no_controllers.launch
rtmlaunch hrpsys_gazebo_general samplerobot_hrpsys_bringup.launch

samplebot_effort

  1. The robot vibrates.
  2. Too many error messages arise. [hrpEC][1576049965.454544] Timeover: processing time = 2.38[ms] (but control rate is 200 Hz!)

To solve 1, I set p-gain to smaller value. https://github.com/start-jsk/rtmros_gazebo/commit/3bcc7261220760d28e8391579407d466168b60e6 To solve 2, I had to modify /opt/ros/kinetic/share/hrpsys_ros_bridge/models/SampleRobot.RobotHardware.conf (not included in this PR) from exec_cxt.periodic.rate: 500 to exec_cxt.periodic.rate: 200

(control rate is defined in 4 files

SampleRobot.RobotHardware.conf (for execution and control of RobotHardware.rtc)

and

https://github.com/start-jsk/rtmros_gazebo/blob/7389a49529be6d373581779f0aa88563c6e6d2bf/hrpsys_gazebo_general/launch/robot_hrpsys_bringup.launch#L23 (for execution of other rtc)(default value)

and

https://github.com/start-jsk/rtmros_gazebo/blob/7389a49529be6d373581779f0aa88563c6e6d2bf/hrpsys_gazebo_general/config/SampleRobot.conf#L2 (for control of other rtc)

and

https://github.com/start-jsk/rtmros_gazebo/blob/7389a49529be6d373581779f0aa88563c6e6d2bf/hrpsys_gazebo_general/src/IOBPlugin.cpp#L21 (for IOBPlugin)(default value) )

With these modification, the robot still cannot walk, so more debugging is needed. samplebot_walk

Naoki-Hiraoka commented 4 years ago

Another bug was found. https://github.com/fkanehiro/hrpsys-base/pull/1288

Naoki-Hiraoka commented 4 years ago

SampleRobot walked in kinetic.

roslaunch hrpsys_gazebo_general gazebo_samplerobot_no_controllers.launch
rtmlaunch hrpsys_gazebo_general samplerobot_hrpsys_bringup.launch
roseus
load "package://hrpsys_ros_bridge/euslisp/samplerobot-interface.l
samplerobot-init
setq *robot* (instance SampleRobot-robot :init)
send *ri* :angle-vector (send *robot* :angle-vector) 5000
send *ri* :start-auto-balancer
send *ri* :start-st
send *ri* :go-pos 1 0 0 

samplebot_walk

The upper body vibrates while walking. It seems that this is because the inertia of upper body of SampleRobot is very small so the simulation easily gets unstable.

Naoki-Hiraoka commented 4 years ago

This PR is included in https://github.com/start-jsk/rtmros_gazebo/pull/250