Code Monkey home page Code Monkey logo

rmf_simulation's Introduction

rmf_simulation

This repository contains simulation plugins used in Open-RMF. It currently supports Gazebo Classic 11 and Gazebo Fortress.

Simulation plugins are split in Building simulation and Robot simulation plugins

Building Simulation

Building simulation plugins are located under rmf_building_sim_* and used to simulate different aspect of buildings such as doors, lifts and crowds (currently through the Menge library). Utility plugins to help with simulation, such as UI widgets to toggle battery consumption and set charging behavior, as well as toggling floor visibility, are also placed in this category.

Door plugin

The door plugin is a model plugin that can be attached to door models to make them interface with Open-RMF. It adds a publisher for door state and a subscription to door requests. An example SDF snippet is below:

<plugin name="door" filename="libdoor.so">
  <v_max_door>0.5</v_max_door>
  <a_max_door>0.3</a_max_door>
  <a_nom_door>0.15</a_nom_door>
  <dx_min_door>0.01</dx_min_door>
  <f_max_door>500.0</f_max_door>
  <door name="main_door" type="DoubleSwingDoor" left_joint_name="left_joint" right_joint_name="right_joint" />
</plugin>

Where:

  • v_max_door is the maximum velocity of the door joints.
  • a_max_door is the maximum acceleration of the door joints.
  • a_nom_door is the nominal acceleration that the door controller will aim for when opening / closing doors.
  • dx_min_door is the threshold used to determine whether the door is open, closed or moving. Specifically if all the door joints are within dx_min_door of their closed position the door will be considered closed, if they are within dx_min_door of their open position the door will be considered closed, otherwise it will be considered moving.
  • f_max_door is the maximum effort for the physics simulation.
  • door is a child element with a series of child attributes:
    • name is the name of the door, as seen by Open-RMF.
    • type is a string that describes the door type, supported door types can be found in rmf_building_map_tools repo.
    • left_joint_name and right_joint_name are the names of the left and right joint for the door, for double doors both are expected to be names of joints in the model, for single doors one of them can be empty or set to empty_joint to make the simulation plugin ignore it.

Lift plugin

The lift plugin is a model plugin that can be attached to lifts to make them interface with Open-RMF. It adds a publisher for lift state and a subscription to lift requests. An example SDF snippet is below:

<plugin name="lift" filename="liblift.so">
  <lift_name>lift_1</lift_name>
  <floor name="L1" elevation="0.0">
    <door_pair cabin_door="CabinDoor_lift_1_lift_1_door" shaft_door="ShaftDoor_lift_1_L1_lift_1_door" />
  </floor>
  <floor name="L2" elevation="10.0">
    <door_pair cabin_door="CabinDoor_lift_1_lift_1_door" shaft_door="ShaftDoor_lift_1_L2_lift_1_door" />
  </floor>
  <initial_floor>L1</initial_floor>
  <v_max_cabin>2.0</v_max_cabin>
  <a_max_cabin>1.2</a_max_cabin>
  <a_nom_cabin>1.0</a_nom_cabin>
  <dx_min_cabin>0.001</dx_min_cabin>
  <f_max_cabin>25323.0</f_max_cabin>
  <cabin_joint_name>cabin_joint</cabin_joint_name>
</plugin>

Where:

  • lift_name is the name of the lift, as seen by Open-RMF.
  • floor describes a floor, there can be any amount of floor elements with:
    • name attribute with the name of the floor, as seen by Open-RMF.
    • elevation attribute with the height in meters of the floor, relative to the ground plane.
    • door_pair child element with a cabin_door attribute to specify which cabin door should open at this floor and a shaft_door attribute to specify which shaft door should open. These names should match the names of doors in the world file.
  • initial_floor The floor that the lift should start at.
  • v_max_cabin, a_max_cabin, a_nom_cabin, dx_min_cabin and f_max_cabin are motion parameters with the same meaning as the ones in the door plugin.
  • cabin_joint_name is the name of the main joint of the cabin, which is the one to be actuated vertically.

Crowd simulation

Crowd simulation configuration is added as a world plugin and is more complex and autogenerated, for an in depth description check the documentation here

Toggle charging

Toggle charging is a world plugin, added by default to all Open-RMF worlds that adds a GUI to toggle charging behaviors, such as enabling / disabling battery consumption or setting chargers to instantly refill the robot battery to reduce idle time in simulations.

It is added with the following snippet:

<plugin name="toggle_charging" filename="libtoggle_charging.so" />

Toggle floors

Toggle charging is a world plugin, added by default to all Open-RMF worlds, that adds a GUI plugin with buttons to enable / disable visibility of specific floors, to make visualization of intermediate floors easier.

An example SDF snippet:

<plugin name="toggle_floors" filename="libtoggle_floors.so">
  <floor name="L1" model_name="clinic_L1">
    <model name="OpenRobotics/PotatoChipChair" />
    <model name="OpenRobotics/PotatoChipChair_2" />
  </floor>
</plugin>

The plugin element has a list of floor children, each of them with:

  • name attribute that will be displayd in the GUI button.
  • model_name points to the name of the floor model generated by rmf_building_map_tools.
  • A list of model children, each with the name of a model that resides on that level.

Robot simulation

Robot simulation plugins under rmf_robot_sim_* are used to simulate aspects of robots behavior, including robot navigation and interfaces to workcells.

Slotcar

Slotcar is a model plugin that acts as a simple robot navigation stack, controlling the robot and sending updates to its fleet adapter through ROS 2 topics.

An example, taken from rmf_demos TinyRobot, is below:

 <plugin name="slotcar" filename="libslotcar.so">

   <nominal_drive_speed>0.5</nominal_drive_speed>
   <nominal_drive_acceleration>0.25</nominal_drive_acceleration>
   <max_drive_acceleration>0.75</max_drive_acceleration>

   <nominal_turn_speed>0.6</nominal_turn_speed>
   <nominal_turn_acceleration>1.5</nominal_turn_acceleration>
   <max_turn_acceleration>2.0</max_turn_acceleration>

   <tire_radius>0.1</tire_radius>
   <base_width>0.3206</base_width>

   <stop_distance>0.75</stop_distance>
   <stop_radius>0.75</stop_radius>

   <!-- Can the robot drive backwards -->
   <reversible>true</reversible>

   <!-- Battery params -->
   <nominal_voltage>12.0</nominal_voltage>
   <nominal_capacity>24.0</nominal_capacity>
   <charging_current>5.0</charging_current>

   <!-- Physical params -->
   <mass>20.0</mass>
   <inertia>10.0</inertia>
   <friction_coefficient>0.22</friction_coefficient>

   <!-- Power systems -->
   <nominal_power>20.0</nominal_power>

 </plugin>

The plugin has the following parameters:

  • nominal_drive_speed, nominal_drive_acceleration, max_drive_acceleration, motion parameters for linear velocity similar to the door plugin.
  • nominal_turn_speed, nominal_turn_acceleration, max_turn_acceleration, motion parameters for angular velocity.
  • tire_radius, base_width, used to convert the requested linear velocity from Open-RMF into a differential drive velocity for the single wheels. Currently only used for Gazebo Classic since Gazebo moves the model itself.
  • stop_distance and stop_radius are added to do simple collision avoidance for the robot, if a robot is closer than stop_distance + stop_radius to another object it will trigger an emergency stop.
  • reversible boolean that denotes whether the robot can drive backwards or not.
  • nominal_voltage voltage of the robot battery.
  • nominal_capacity capacity in Ampere-hour of the robot battery.
  • charging_current Current of the charger, ignored if the charging is set to instantaneous.
  • mass, robot mass in kilograms.
  • inertia, angular moment of inertia around the Z axis, in kg*m^2.
  • friction_coefficient, amount of energy lost in linear movement due to friction, between 0 and 1.
  • nominal_power, the amount of power used by the robot even when idle (in W).

Readonly

Readonly is a model plugin that can be attached to mobile entities that only provide their position to Open-RMF. The plugin uses the entity's current position and heading, together with a provided navigation graph, to estimate its itinerary and provide it to other fleets for traffic deconfliction.

An example from rmf_demos Caddy below:

<plugin name="readonly" filename="libreadonly.so">
  <!-- Map name where the robot is spawned -->
  <level_name>L1</level_name>
  <!-- Index of navigation graph for the robot as stored in BuildingMap msg -->
  <graph_index>2</graph_index>
  <!-- Name of waypoint where caddy is spawned in the map -->
  <spawn_waypoint>caddy</spawn_waypoint>
  <!-- Number of waypoints to include in predicted path -->
  <look_ahead>3</look_ahead>
  <!-- Update rate (hz) at which robot_state is published -->
  <update_rate>15</update_rate>
  <!-- Waypoint threshold (m). Radius around the waypoint to determine if caddy is at that waypoint   -->
  <waypoint_threshold>2.0</waypoint_threshold>
  <!-- If true, predicted path will merge robot with nearest lane -->
  <merge_lane>false</merge_lane>
  <!-- Normal distance of robot from its lane, greater than which its path will merge with the lane -->
  <lane_threshold>0.2</lane_threshold>
</plugin>

In this example, the robot will use navigation graph index 2 and try to generate a path with 3 waypoints ahead of its current location and heading and publish state updates at 15 Hz. waypoint_threshold, merge_lane and lane_threshold are used to determine whether a robot is on a waypoint, a lane, or outside of the navigation graph.

Teleport dispenser

Teleport dispenser is a model plugin that dispenses objects to a robot by finding the closest non static object and teleporting it to the closest robot. An example snippet is below:

<plugin name="teleport_dispenser" filename="libteleport_dispenser.so"/>

Teleport ingestor

Teleport ingestor is a model plugin that ingests an object from a robot by finding the closest non static items to a robot and teleporting it to the ingestor's location.

An example snippet is below:

<plugin name="teleport_ingestor" filename="libteleport_ingestor.so"/>

Repository organization

Most plugins are split into a common, gz and gz_classic package. The common package contains the simulator independent logic, such as ROS 2 publishers / subscribptions, core logic, while the gz and gz_classic packages contain a wrapper to interface to the specific simulators.

Supported versions

Since Gazebo and ROS 2 have a different release schedule, this package will follow the ros_gz supported version and, depending on which ROS 2 version Open-RMF is currently targeting, the Gazebo version will be set accordingly to allow using the binary release of the ros_gz_bridge. For example, previous supported versions have been ROS Galactic <-> Gazebo Edifice and ROS Humble <-> Gazebo Fortress.

Gazebo Classic support through the gz_classic plugins is only guaranteed until Gazebo 11 EOL (currently scheduled for January 2025) and might be removed afterwards. Users are encouraged to use Gazebo for future development.

rmf_simulation's People

Contributors

aaronchongth avatar arjo129 avatar chianfern avatar cnboonhan avatar ddengster avatar gbiggs avatar luca-della-vedova avatar mrushyendra avatar mxgrey avatar orensbruli avatar yadunund avatar youliangtan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rmf_simulation's Issues

[Bug]: plugin/slotcar/joint_cmd] is not valid

Before proceeding, is there an existing issue or discussion for this?

OS and version

Ubuntu 22.04

Open-RMF installation type

Binaries

Other Open-RMF installation methods

No response

Open-RMF version or commit hash

2.3.0

ROS distribution

Humble

ROS installation type

Source build

Other ROS installation methods

No response

Package or library, if applicable

rmf_robot_sim_gz_plugins

Description of the bug

I have been trying to create my own demo on Open-RMF. Followed this tutorial to do so. I managed to create the traffic lanes and can open the world I created on Gazebo-11, while displaying it on RViz also. But, right after I added a robot, I got an error regarding the slotcar plugin.

[gzclient-18] Topic [/data://world/world/model/deliveryRobot_0/plugin/slotcar/joint_cmd] is not valid.
[gzclient-18] [Err] [JointControlWidget.cc:393] Error advertising topic [/data://world/world/model/deliveryRobot_0/plugin/slotcar/joint_cmd]

How could I fix this error?

Steps to reproduce the bug

  1. Launched Gazebo and RViz with the .launch.xml file I created inside my pkg, with the given configs (map_name, map_package, plugin_path, nav_graph_file ...)
  2. Clicked the slotcar under PLUGINS on Gazebo's World display.
    image
  3. Error msg on the terminal shows up.
    image

Expected behavior

Being able to control the robot like a turtlebot3

Actual behavior

slotcar plugins does not work properly

Additional information or screenshots

No response

[slotcar] Improve collision detection

Right now the slotcar is requested to stop if the distance between its world pose and that of a non-static obstacles is less than a threshold. This is not very robust as two obstacles can have the same world pose but one with a larger geometry than the other. The slotcar will drive closer to the larger obstacle or worse might even collide. Hence, setting the threshold parameter is not very intuitive.

We should instead store AABBs of obstacles and then do a simple broadphase collision check between the robot AABB and that of the obstacle.

Slotcar in Ignition doesn't move

Bug report

Required information:

Ignition Edifice 5.1.0 (built from source) under Ubuntu 20.04 and ROS2 Foxy

Description of the bug

When commands are sent to slotcar it correctly receives the trajectories and computes the necessary velocity commands, however the robots don't move.

Steps to reproduce the bug

Run a demo (i.e. office demo): ros2 launch rmf_demos office.launch.xml use_ignition:=1 then use the Web UI localhost:5000 to issue a command.

Expected behavior

The robot that has been assigned the trajectory moves.

Actual behavior

Nothing happens and rmf_traffic keeps rescheduling to try to fix the delays.

Additional information

This is a regression since the demos worked before. Currently bisecting and under Ignition Gazebo 5.0.0 (first binary release of Edifice) it was working correctly, it is likely to be related to the latest changes in the package.

Make lifts manage their own doors

Feature request

Description

Make lift simulation plugins manage their own doors, instead of using door plugins.

Implementation considerations

Currently, lift doors are commanded through a door plugin. While this works, the architecture is fundamentally wrong since the simulated lifts will publish a request to the door_supervisor to request opening a lift door, which runs a door plugin.
In reality, lifts would manage their own doors and wouldn't need to go through RMF to operate them.
Additionally, since lift doors are running door plugins they also appear in the rviz door panel, which shouldn't be the case since RMF is not managing the doors individually, i.e. in the hotel world from rmf_demos:

image

rmf_robot_sim_gazebo_plugins build error

Bug report

Required information:

  • Operating system and version:
    • Ubuntu 22.04
  • OpenRMF installation type:
  • ROS distribution and version:
    • ROS2 Humble
  • ROS installation type:
  • Package or library, if applicable:
    • rmf_robot_sim_gazebo_plugins

Description of the bug

Build failing due to header file not being found.

--- stderr: rmf_robot_sim_gz_plugins                                                                                 
In file included from /home/kai/rmf_humble_ws/src/rmf/rmf_simulation/rmf_robot_sim_gz_plugins/src/TeleportIngestor.cpp:23:
In file included from /usr/include/ignition/plugin1/ignition/plugin/Register.hh:18:
In file included from /usr/include/ignition/plugin1/gz/plugin/Register.hh:22:
/usr/include/ignition/plugin1/gz/plugin/detail/Register.hh:28:10: fatal error: 'gz/utilities/SuppressWarning.hh' file not found
#include <gz/utilities/SuppressWarning.hh>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Error log can be found at: https://gist.github.com/lkw303/e9f0500d51c18acc168dfa4cd524d8ac

Steps to reproduce the bug

Additional information

This is the change log of the libignition-utils1 debian package. I am not sure if the latest change (which i believe is the migration of headers) was the cause of this.

ignition-utils1 (1.5.0-1~jammy) jammy; urgency=medium

  * ignition-utils1 1.5.0-1 release

 -- Nate Koenig <[email protected]>  Thu, 08 Dec 2022 14:29:21 -0800

ignition-utils1 (1.4.1-1~jammy) jammy; urgency=medium

  * ignition-utils1 1.4.1-1 release

[Bug]: Error in the slotcar.cpp when building from source on ROS2 humble rmf_robot_sim_gz_classic_plugins

Before proceeding, is there an existing issue or discussion for this?

OS and version

Ubuntu 22.04

Open-RMF installation type

Source build

Other Open-RMF installation methods

No response

Open-RMF version or commit hash

f71d2d3

ROS distribution

Humble

ROS installation type

Binaries

Other ROS installation methods

No response

Package or library, if applicable

No response

Description of the bug

Error in the slotcar.cpp when building from source on ROS2 humble rmf_plugins_utils does not contain sanitize_node_name

/rmf_ws/src/rmf/rmf_simulation/rmf_robot_sim_gz_classic_plugins/src/slotcar.cpp:86:22: error: no type named 'sanitize_node_name' in namespace 'rmf_plugins_utils'
  rmf_plugins_utils::sanitize_node_name(node_name);
  ~~~~~~~~~~~~~~~~~~~^
1 error generated.
gmake[2]: *** [CMakeFiles/slotcar.dir/build.make:76: CMakeFiles/slotcar.dir/src/slotcar.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:221: CMakeFiles/slotcar.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2

Steps to reproduce the bug

  1. download ROS2 humble binaries
  2. Build from source with the instruction here

Expected behavior

No response

Actual behavior

No response

Additional information or screenshots

No response

Ackermann drive plugin gets stuck when in place turns are introduced.

Bug report

Required information:

Build from source of RMF on Ubuntu 20.04 and ROS Galactic

Description of the bug

When an ackermann drive vehicle is required to turn in place for any reason the plugin stops working altogether and the vehicle gets stuck in place.
This means that every time a vehicle ends a trajectory in a corner waypoint, it will likely be stuck there indefinitely if the corner is sharp enough.
I'm not too familiar with the ackermann code but my guess is that this is an edge case where the vehicle is in an area inside the arc between the waypoints that are being interpolated to make a smooth bend.

Steps to reproduce the bug

Create a navgraph with sharp turns (i.e. a square), make the vehicle execute two consecutive trajectories, where the first one ends in a corner and the second one starts from the same corner.

Expected behavior

The vehicle would execute a somewhat sharp turn to proceed to its first waypoint.

Actual behavior

The vehicle turns a bit, gets stuck and never actually executes its trajectory.

Remove Boost dependency

Feature request

Description

The whole rmf codebase has almost no boost dependency except for this package. We should try to remove any boost dependency since it's a bulky library and is only very sparingly used.

Implementation considerations

Most of the functionality implemented in boost functions in this package is inside thumbnail_generator and crowd_simulator and has actually been migrated to the standard library, such as filesystem, dynamic_pointer_cast and exceptions.
The only non-immediate migration will be from boost::program_options, but there seem to be alternatives (such as the C style getopt()).

Upgrade to Ignition Fortress

Feature request

Description

Ignition plugins are currently targeting Ignition Edifice and ROS2 Galactic. We should migrate to Fortress for ROS2 Jammy to have them run on LTS platforms.

Implementation considerations

Work started in the feature/ignition_fortress branch but was stalled because binaries of ros_ign were missing. Since they will be released together with Humble we should probably migrate our plugins by Humble release time

Unify ackermann and diff_drive plugins to be compatible with RMF

Feature request

Description

Make ackermann vehicles compatible with RMF.

Implementation considerations

Right now vehicles with ackermann steering can't be controlled by RMF since slotcar subscribes to a different topic than the one used by the rest of the stack (ackmann_path_requests vs robot_path_requests).
As such, slotcar for ackermann type vehicles will ignore any path request sent to robot_path_requests.

Alternatives

Since for now both the topics expect the same data type, the simplest way to deal with the issue would be to subscribe to robot_path_request then when a message is received, depending on the vehicle type, execute what is now in the ackmann callback or the normal path request callback.
There might still be need for some work to get a solid RMF ackermann implementation such as:

  • Make sure the slotcar ackermann plugin respects time (i.e. if RMF schedules a wait at a certain waypoint, the vehicle should stop and wait).
  • Add support at the rmf_traffic level, by implementing appropriate rmf_traffic::agv::Interpolate and rmf_traffic::agv::VehicleTraits.

But at least this change should get a minimal implementation up.

[Bug]: Thumbnail generator is trying to save an empty image

Before proceeding, is there an existing issue or discussion for this?

OS and version

Ubuntu 22.04.03 LTS

Open-RMF installation type

Source build

Other Open-RMF installation methods

No response

Open-RMF version or commit hash

be887b4

ROS distribution

Humble

ROS installation type

Binaries

Other ROS installation methods

No response

Package or library, if applicable

rmf_building_sim_gz_classic_plugins

Description of the bug

The Gazebo plugin thumbnail_generator responsible for creating the thumbnails used by the rmf_traffic_editor package is trying to save an empty image, causing an exception:

  • input model: /home/thulioamorim/.gazebo/models/SUV/model.sdf
  • output dir: .
  • configs: 4000, 200.000000, 0.080000
    Initializing Thumbnails Gen Plugin
    Generating Thumbnail for SUV
    terminate called after throwing an instance of 'cv::Exception'
    what(): OpenCV(4.5.4) ./modules/imgcodecs/src/loadsave.cpp:799: error: (-215:Assertion failed) !_img.empty() in function 'imwrite'

Aborted (core dumped)

Steps to reproduce the bug

  1. Run the example from the rmf_traffic_editor:
gzserver -s libthumbnail_generator.so empty.world --input ~/.gazebo/models/SUV/model.sdf --output .

Expected behavior

No response

Actual behavior

No response

Additional information or screenshots

No response

Use colcon test for style checking

The CMakeLists.txt files in this repo do not invoke ament_cmake_uncurstify if BUILD_TESTING as in other open-rmf repos. The CI for this repo also has a separate style workflow. We should update the CMakeLists.txt files so that we can rely on colcon tests for CI.

[Bug]: Using dashes in door, lift, or level names leads to an exception in the plugins

Before proceeding, is there an existing issue or discussion for this?

OS and version

Ubuntu 22.04

Open-RMF installation type

Source build

Other Open-RMF installation methods

No response

Open-RMF version or commit hash

2.2.1

ROS distribution

Humble

ROS installation type

Source build

Other ROS installation methods

No response

Package or library, if applicable

No response

Description of the bug

I've found that if a floor, door, or lift name contains a dash, then gz classic plugins throw an exception during loading and then impacted infrastructure doesn't work.

I assume the infrastructure name is being put into something like a topic name that has some kind of character restrictions that we're not enforcing from the traffic editor. It's not great for the simulations to inexplicably fail due to choice of names, so maybe we should convert automatically dashes to underscores when they get used in places with character restrictions.

Steps to reproduce the bug

Make a map in the traffic editor where a floor, door, or lift name contains a dash. Launch that map in simulation and stare in bewilderment when the door or lift doesn't move.

Expected behavior

No response

Actual behavior

No response

Additional information or screenshots

No response

Make slotcar respect speed limits

Feature request

Description

As a part of our ongoing effort in implementing speed limits in lanes we should add support in slotcar for respecting lanes speed limits.

Implementation considerations

A possible approach involves adding a new parameter to mode request to set the speed and have the robot subscribe to it, an alternative would be to parse the navgraph at the slotcar level and keep track of the lane the robot is in and its speed limit.

Error: no matching function for call to 'Get'

Bug report

Following the steps for compilation for the main branch, humble release, gives this error:

Finished <<< rmf_traffic_editor_test_maps [2min 23s]
--- stderr: rmf_building_sim_gz_classic_plugins
/home/user/rmf_ws/src/rmf/rmf_simulation/rmf_building_sim_gz_classic_plugins/src/door.cpp:36:22: error: no matching function for call to 'Get'
auto _ros_node = gazebo_ros::Node::Get(sdf, node_name);

Seems that the gazebo classic elements are not compatible with the ones installed for gazebo 11.

Toggle floor in ignition sim

Since now the default rmf_demos world is a multi-floor hotel.world, we certainly need a similar floor toggle button on ignition gui. This floor toggle feature will be similar to what is currently available on _gz gui.

Robot spinning unnecessarily

Description of the bug

Recent changes introduced a bug in simulation, where cleaning robots tend to spin on the spot in the middle of a cleaning task. In earlier commits, the robot only pauses at the spot instead of turning around. This can be reproduced in hotel world by running the clean_lobby task. The latest working commit without spinning is 80b22b9.

Edit: Observed when using demo fleet adapter, not full_control

No spinning:

lobby.pause.1.mp4

Spinning:

lobby.spin.1.mp4

Doors not working in latest Gazebo Fortress binary update

Bug report

Required information:

  • Operating system and version:
    • Any Ubuntu with binary fortress avaialble
  • OpenRMF installation type:
    • From source
  • Package or library, if applicable:
    • rmf_building_sim_common

Description of the bug

Update of Gazebo Fortress from 6.9 to 6.10 changed the behavior of the sdf::ElementPtr that is passed to the Configure function, it now uses sdf::Plugin and no longer has access to the parent element.
This breaks our current behavior where, in both Gazebo classic and Gazebo, we use the element pointer to traverse up from the plugin to the door that contains it to read joint limits and apply smooth accelerations / decelerations.
Reference issue on the gz-sim repo

Steps to reproduce the bug

  1. Launch RMF using ros2 launch rmf_demos_ign office_demo.launch
  2. Send a robot through a door
  3. Door will not open

There will also be a printout about being unable to access the parent element when configuring the door plugin.

Possible fixes

The issue can be fixed at the gz-sim level but that sounds like a non ideal approach since, although the behavior change was unintended, it is not a common use case and might be deprecated and removed in future versions.
A future-proof approach would involve using the ECM to access the joint properties, instead of traversing the SDF Element, as suggested in the linked issue.

Ignition Edifice migration

Feature request

Description

RMF so far has been built and used with Ignition Dome, now that Ignition Edifice has been released we should start migrating to it so we can try to experiment with some of the newest features (i.e. lightmaps, sky textures, the new GUI plugins or even Collada exporters).

Implementation considerations

There should be no major behavior change and it should be as simple as changing the semver library version in the CMakeLists / package.xml as well as updating the documentation, but testing to make sure no regressions are introduced is required.

Replace compute_ds with compute_desired_rate_of_change

In code governing the motion of objects, we use compute_desired_rate_of_change and compute_ds for different objects.

compute_desired_rate_of_change follows the correct kinematics equations as far as I can tell, but we have some robots (slotcar/readonly) using compute_ds and may have associated values like velocity/acceleration/turning radius multiplier that need to be tweaked accordingly. Whoever gets to correcting this should look at other objects to see that nothing in our simulations goes wrong or looks awful.

[slotcar] reversible

We should support a boolean reversible parameter which dictates whether the robot can drive backwards or not.

Use real time for Slotcar Plugin

Feature request

An option to use real clock time, instead of sim time, for the slotcar plugin

Description

Currently, slotcars can only publish sim time. This presents some friction when testing with real hardware, who will use real time. It will be helpful to set slotcars to use real time.

Implementation considerations

The configuration to use sim time or not should ideally propagate from the ROS2 parameters set when launching RMF instances.

Ackermann vehicles don't report their state

Bug report

Required information:

Ubuntu 20.04, on Galactic - RMF Source build

Description of the bug

Vehicles with Ackermann steering don't report their state in a ROS2 topic, hence making it impossible for downstream users to know / display their position.

Steps to reproduce the bug

Run a simulation with ackermann steering vehicles:

ros2 launch rmf_demos_ign test_ackmann.launch.xml

Then check the /robot_state topic in another terminal:

ros2 topic echo /robot_state

Expected behavior

The state of the robots is reported.

Actual behavior

Nothing is published

Additional information

It seems that in the design of the update_nonholonomic function the publish_robot_state(time) call was not included.

rmf_robot_sim_common in rolling fails to build on rhel targets

The package rmf_robot_sim_common in rolling has been detected as not building on all platforms in the buildfile rhel. The release manager for rolling will consider disabling this build if it continues to fail to build.

  • jenkins_urls:
    • rhel 8 x86_64
      This is being filed because this package is about to be blacklisted. If this ticket is resolved please review whether it can be removed from the blacklist that should cross reference here.

Here is an excerpt from the log of the most recent build:

DEBUG: [ 10%] Building CXX object CMakeFiles/rmf_robot_sim_utils.dir/src/utils.cpp.o
DEBUG: /usr/bin/c++ -DDEFAULT_RMW_IMPLEMENTATION=rmw_cyclonedds_cpp -DRCUTILS_ENABLE_FAULT_INJECTION -Drmf_robot_sim_utils_EXPORTS -I/builddir/build/BUILD/ros-rolling-rmf-robot-sim-common-1.2.0/include -isystem /opt/ros/rolling/include -isystem /usr/lib64/python3.6/site-packages/numpy/core/include -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -Wall -Wextra -Wpedantic -std=gnu++17 -MD -MT CMakeFiles/rmf_robot_sim_utils.dir/src/utils.cpp.o -MF CMakeFiles/rmf_robot_sim_utils.dir/src/utils.cpp.o.d -o CMakeFiles/rmf_robot_sim_utils.dir/src/utils.cpp.o -c /builddir/build/BUILD/ros-rolling-rmf-robot-sim-common-1.2.0/src/utils.cpp
DEBUG: In file included from /builddir/build/BUILD/ros-rolling-rmf-robot-sim-common-1.2.0/src/utils.cpp:4:
DEBUG: /builddir/build/BUILD/ros-rolling-rmf-robot-sim-common-1.2.0/include/rmf_robot_sim_common/utils.hpp:6:10: fatal error: Eigen/Geometry: No such file or directory
DEBUG:  #include <Eigen/Geometry>
DEBUG:           ^~~~~~~~~~~~~~~~
DEBUG: compilation terminated.
DEBUG: make[2]: *** [CMakeFiles/rmf_robot_sim_utils.dir/build.make:79: CMakeFiles/rmf_robot_sim_utils.dir/src/utils.cpp.o] Error 1
DEBUG: make[2]: Leaving directory '/builddir/build/BUILD/ros-rolling-rmf-robot-sim-common-1.2.0/obj-x86_64-redhat-linux-gnu'
DEBUG: make[1]: Leaving directory '/builddir/build/BUILD/ros-rolling-rmf-robot-sim-common-1.2.0/obj-x86_64-redhat-linux-gnu'
DEBUG: make[1]: *** [CMakeFiles/Makefile2:226: CMakeFiles/rmf_robot_sim_utils.dir/all] Error 2

[Feature request]: Add `GaussianNoiseModel` to slotcar to report poses with some noise

Before proceeding, is there an existing issue or discussion for this?

Description

Right now slotcar always reports the exact pose of the robot model in the world. We could add some noise to the reported pose by embedding a GaussianNoiseModel to the implementation while the mean and stddev can be configured SDF params.

Implementation Considerations

No response

Alternatives

No response

Additional information

No response

gz-classic plugins crash when running with Humble

Bug report

Required information:

OS: Ubuntu 22.04
ROS 2: Humble binaries
RMF: Source (all branches on main)

Description

Currently it is not possible to run rmf_demos with gz-classic when running with ROS 2 Humble. This is due to a change in API and behavior in upstream gazebo_ros pkg (v3.7.0). Specifically, gazebo_ros::Node::get() method as seen in humble will throw an error if multiple nodes with the same name is detected.

However this is not the case with galactic as seen here. With galactic, an error is not thrown for duplicate node names.

As seen in the header documentation, the default node name will be the name supplied to the tag. The building map generator typically exports the .world file with plugins with the same name. For example:

<plugin name="door" filename="libdoor.so">

For some of the plugins such as slotcar, the name of the plugin is fixed within the model.sdf file and cannot be substituted for at run time.

As a result, gzserver will crash

[gzserver-15] [ERROR] [gazebo_ros_node]: Found multiple nodes with the same name: /teleport_dispenser

Make busy lift terminal output less threatening

A followup from this discussion: open-rmf/rmf#40 (reply in thread)

It would be nice if the message that gets outputted by the lift when it's busy carrying out a task could be reworked so that it doesn't lead users to think that something is wrong. We could reword it, or we could remove it altogether when the incoming requests perfectly matches the current request.

We could also consider revising the lift supervisor so that it doesn't duplicate this request message.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.