RoboCupAtHome / RuleBook

Rulebook for RoboCup @Home 2024
https://robocupathome.github.io/RuleBook/
Other
148 stars 60 forks source link

Discussion: Encourage collaboration on a Gazebo simulation environment #731

Closed moriarty closed 2 years ago

moriarty commented 4 years ago

Problem

The RoboCup Organization has not yet postponed RoboCup 2020. But the Olympics were just cancelled so... teams should be ready for any decision. https://twitter.com/i/web/status/1241048535312859137

Suggestion

I'd like to see teams collaborate on a shared Gazebo simulation environment.

Alternatives

Other simulations options: Unity, Unreal etc require licensing and aren't as well supported by the larger open source robotics community.

Additional context

  1. RoboCup has not been cancelled or postponed (as of time of writting)
  2. I am not advocating for a RoboCupAtHome simulation league. I'm just suggesting this as a good opportunity for researchers to collaborate while their university labs are likely closed due to social distancing.
  3. Gazebo works best when used with the ROS wrapper but it's possible to use without ROS: it's just requires reinventing lots of wheels. If you don't use ROS, then you can still reinvent wheels or use a bridge between your systems and whatever you use.
moriarty commented 4 years ago

Here is a sparsely documented example of an @RoboCupAtHome simulation environment from the @b-it-bots the room number of their lab is "c069" and they also have an "istanbul-2011" environment available. https://github.com/b-it-bots/mas_common_robotics/tree/kinetic/mcr_environments/mcr_gazebo_worlds

justinhart commented 4 years ago

This could be fun.

alex-mitrevski commented 4 years ago

I would just like to point out that Toyota had (or still has, I'm not sure) a simulation-based competition - the so-called HSR Home Chores Challenge.

This is a video showing a team from UC Berkeley performing a task in the challenge.

Perhaps it would be an option to discuss with Toyota if they could open-source their simulator (which is also in Gazebo)? Otherwise everyone would just spend time recreating what Toyota already has.

Regarding alternative simulation environments, Morse and Webots are solid candidates in my opinion.

t-inamura commented 4 years ago

My colleagues and I have developed a platform for RoboCup@Home Simulation. Please see several papers as follows. This system has been used in RoboCup JapanOpen since 2013 and also used in an international competition named WRS (World Robot Summit). The difference between Gazebo simulation is the real-time participation of real users in robot simulation using a VR system. I think that the essential factor in RoboCup@Home is human-robot interaction, not only the physical simulation-based test. I believe our system has the potential to realize the RoboCup@Home Simulation. The system is available on GitHub https://github.com/RoboCupatHomeSim

References: http://www.sigverse.org/wiki/en/

What competitions were conducted in the service categories of the World Robot Summit? https://www.tandfonline.com/doi/abs/10.1080/01691864.2019.1663608?journalCode=tadr20

Competition Design to Evaluate Cognitive Functions in Human-Robot Interaction Based on Immersive VR (RoboCup Symposium 2017) https://link.springer.com/chapter/10.1007%2F978-3-030-00308-1_7 PDF: https://researchmap.jp/inamura/published_papers/18421801/attachment_file.pdf

Development of RoboCup@Home Simulation towards Long-term Large Scale HRI (RoboCup Symposium 2013) https://link.springer.com/chapter/10.1007%2F978-3-662-44468-9_64 PDF: https://researchmap.jp/inamura/published_papers/5460606/attachment_file.pdf

HareshKarnan commented 4 years ago

Hi all, the RoboCup organization has postponed the event to 2021, in Bordeaux, France.

https://2020.robocup.org/en/home/

moriarty commented 3 years ago

https://github.com/hsr-project/tmc_wrs_docker

moriarty commented 3 years ago

735

alex-mitrevski commented 3 years ago

@moriarty In case it helps, the overall simulation setup that was followed at Japan Open in December is explained in detail at https://dev.to/yosuke/robocup-simulation-league-is-accepting-your-challenge-for-free-1g66

moriarty commented 3 years ago

@moriarty In case it helps, the overall simulation setup that was followed at Japan Open in December is explained in detail at https://dev.to/yosuke/robocup-simulation-league-is-accepting-your-challenge-for-free-1g66

"explained in detail" is used lightly here. I looked over that article, and the rulebook for the RoboCup Japan Open simulation and didn't see any mention of Gazebo which is the simulator being used under the hood, they refer to it as HSR Simulator. And point to this repository: https://github.com/hsr-project/tmc_wrs_docker ... but that repo has a docker-compose.yml file which contains:

  simulator:
    image: ghcr.io/hsr-project/tmc_wrs_docker:latest

The thing I was actually looking for, was how that ghcr.io/hsr-project/tmc_wrs_docker:latest is built, and how it can be modified to be more generic to be used by non-HSR users. This stems from an ongoing discussion about how to best enable all the other leagues to participate this year.

Counter intuitively, the Dockerfile and code to build the ghcr.io/hsr-project/tmc_wrs_docker image is not in the repository https://github.com/hsr-project/tmc_wrs_docker but, instead located in https://github.com/hsr-project/tmc_wrs_binary

tmc_wrc_docker, is a great project, and it does bring up the gazebo simulator, robot, and automatic task evaluation stuff very easily, but it would require a little bit of work to make the robot being launched more generic.

https://github.com/hsr-project/tmc_wrs_binary/blob/748385db58ede45b4de31a23651cffea6ec6fec6/Dockerfile#L107

CMD ["/usr/local/bin/supervisord", "-n", "-c", "/etc/supervisor/supervisord.conf"]

https://github.com/hsr-project/tmc_wrs_binary/blob/748385db58ede45b4de31a23651cffea6ec6fec6/supervisord.conf#L21

[program:simulator]
command=/entrypoint.sh roslaunch hsrb_wrs_gazebo_launch wrs_practice0_easy_tmc.launch use_oss_stacks:=true fast_physics:=true highrtf:=true

https://github.com/hsr-project/hsrb_wrs_gazebo_launch/blob/28064d36b880f2b22cfb19339ab49e9fa48dd442/launch/wrs_practice0_easy_tmc.launch#L51

  <include file="$(find hsrb_wrs_gazebo_launch)/launch/include/wrs_common.xml" pass_all_args="true" >
    <arg name="per_category" value="2" />
    <arg name="obstacles" value="2" />
    <arg name="per_row" value="4" />
  </include>

Finally where the magic happens: https://github.com/hsr-project/hsrb_wrs_gazebo_launch/blob/master/launch/include/wrs_common.xml

  <arg name="world_name" default="$(find tmc_wrs_gazebo_worlds)/worlds/wrs2020$(arg world_suffix)$(arg world_suffix2)$(arg world_suffix3).world" />
  <group if="$(arg use_oss_stacks)">
    <!-- world -->
    <include file="$(find hsrb_gazebo_bringup)/launch/hsrb_empty_world.launch">
      <arg name="debug" value="$(arg debug)"/>
      <arg name="fast_physics" value="$(arg fast_physics)" />
      <arg name="gazebo_visualization" value="$(arg gazebo_visualization)" />
      <arg name="use_laser_odom" value="$(arg use_laser_odom)" />
      <arg name="use_oss_stacks" value="$(arg use_oss_stacks)" />
      <arg name="paused" value="$(arg paused)" />
      <arg name="world_name" value="$(arg world_name)" />
      <arg name="robot_pos" value="$(arg robot_pos)" />
      <arg name="gui" value="$(arg gui)"/>
      <arg name="robot_name" value="$(arg robot_name)" />
    </include>

    <!-- moveit-->
    <include file="$(find hsrb_moveit_config)/launch/hsrb_demo_with_controller.launch">
      <arg name="use_gui" value="false"/>
      <arg name="load_robot_description" value="false"/>
    </include>

    <!-- rosnav -->
    <include file="$(find hsrb_rosnav_config)/launch/hsrb_nav.launch">
      <arg name="map_file" value="$(arg map)"/>
      <arg name="localization_type" value="iris_lama_loc2d"/>
    </include>

    <!-- pose_to_odom -->
    <node pkg="topic_tools" type="relay" name="odom_relay"
          args="/hsrb/laser_odom /hsrb/odom" if="$(arg use_laser_odom)" />
    <node pkg="topic_tools" type="relay" name="odom_relay"
          args="/hsrb/offset_diff_drive_controller/odom /hsrb/odom" unless="$(arg use_laser_odom)" />
  </group>

If someone were to want to use this infrastructure for OPL, they'd need to modify up until this point... and swap:

    <include file="$(find hsrb_gazebo_bringup)/launch/hsrb_empty_world.launch">
    <include file="$(find hsrb_moveit_config)/launch/hsrb_demo_with_controller.launch">
    <include file="$(find hsrb_rosnav_config)/launch/hsrb_nav.launch">

with their own robot equivalents, spawning them into the world tmc_wrs_gazebo_worlds specified: https://github.com/hsr-project/tmc_wrs_gazebo/tree/master/tmc_wrs_gazebo_worlds

These tmc_wrs_gazebo_worlds, and look good enough to solve this issue... I would like to see someone from OPL stick an alternative robot into the environment before we call this issue closed.

moriarty commented 3 years ago

I gave this a quick try with another robot and was not as successful as I had hoped in the limited amount of free time I had. It's definitely possible, it just required a little more hacking than I had expecting. I thought this would take under an hour, it took under 3... mostly fixing package.xml files because I couldn't use rosdep install --from-paths src --ignore-src -r -y ... I eventually got all the dependencies installed. And then commenting out things from launch files which caused complaints.

Peek 2021-02-08 22-39

disclaimer: I chose the robot that I was most familiar with, I considered tiago and I'm sure someone familiar with that robot could get it to work.

But, FYI @justinhart & @kyordhel I did stumble across an interesting issue... which is a little concerning, and one reason I want to ensure all simulated robot plugins are openly available for inspection prior to the competition... https://github.com/hsr-project/tmc_wrs_gazebo/issues/2#issuecomment-747189352

moriarty commented 3 years ago

@raphaelmemmesheimer or @nickswalker ... are either of you able to try out your robots in this gazebo environment? or tag someone who you know that might be able to and provide any feedback from an OPL prospective?

moriarty commented 3 years ago

In addition to the modifications suggested above https://github.com/RoboCupAtHome/RuleBook/issues/731#issuecomment-774631744:

In: https://github.com/hsr-project/hsrb_wrs_gazebo_launch/blob/master/launch/include/wrs_common.xml The following nodes are HSR specific and must be commented out or the linked to lines modified further

raphaelmemmesheimer commented 3 years ago

I forwarded this to the team.

moriarty commented 3 years ago

@raphaelmemmesheimer & @RoboCupAtHome/technical-commmittee I linked to https://github.com/hsr-project/tmc_wrs_gazebo/issues/2 and just wanted to add:

I am aware that grasping in simulation is difficult. I think the League should accept some degree of well documented hacks and focus on what can be tested in the simulation environment.

Instead of spending lots of time developing and fine tuning gripper plugins, finger parameters, etc, focus on getting as much as possible up and working in simulation, and ensure the rulebook and tasks focus on the parts which can be simulated well... It's very likely that the simulation league infrastructure will be around for the future, and we can improve and remove the hacks over time.

dmueller0 commented 3 years ago

Hi all :wave: let me shortly introduce myself first as new team leader of team homer@UniKoblenz. :slightly_smiling_face: Sadly this hasn't been possible in person since end of 2019 due to COVID.

So far, we have stuck the TIAGo model into some pretty default Gazebo environment and grasping in simulation seems to work pretty well out-of-the-box as we know it in real setups (see here for example; black quad in rviz only due to incomplete local setup at the recording machine :wink: ). In parallel, we are trying to also model Lisa to get some general knowledge of robot model creation for Gazebo, but I guess one could orient on the existing TIAGo model (where applicable).

BTW: We'll still have to take a look at the previously linked HSR environment for customizations as we are trying to tackle multiple challenges which arise from switching to a simulated environment.