Giter VIP home page Giter VIP logo

flatland's Introduction

README

ci test result

What is this repository for?

  • Flatland is a performance centric 2d robot simulator
  • Roadmap on trello
  • Release Version: None

How do I get set up?

  • Git clone flatland into your catkin workspace's src folder, and catkin build.
  • Optionally check out turtlebot_flatland and run the turtlebot nav stack
  • Run rosdep install --from-paths src --ignore-src in your catkin workspace to install any missing rosdeps

Who do I talk to?

  • Please direct any questions to @josephduchesne

Documentation

License

All Flatland code is BSD 3-clause licensed (see LICENSE for details)

Flatland uses a number of open source libraries that it includes in its source tree:

  • ThreadPool Copyright (c) 2012 Jakob Progsch, Václav Zeman (zlib license)
  • Tweeny Copyright (c) 2016 Leonardo Guilherme de Freitas (MIT license)
  • Box2d Copyright (c) 2006-2017 Erin Catto http://www.box2d.org (zlib license)

flatland's People

Contributors

avidbots-kenneth avatar avidbots-marc avatar eborghi10 avatar josephduchesne avatar jspricke avatar kam3k avatar lichunshang avatar marbosjo avatar mbrousse avatar pbelanger-avid avatar robustify avatar yirenavidbots avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flatland's Issues

Would a local frame TwistStamped output be helpful?

In my class, I show my students how to apply dead reckoning to encoder measurements to generate odometry outputs for use by SLAM or AMCL. To demonstrate this, I plan on modifying the diff_drive plugin to optionally output a local frame TwistStamped message to simulate encoder-derived speed and yaw rate measurements.

I realize this is a pretty specific use case, since the existing odometry output almost produces what I make the students do themselves. The only difference is that by integrating a noisy local frame twist, drift will accumulate over time. If you foresee this feature being useful for your purposes though, I can make a pull request about this for you to review.

Disable Collision?

Is it possible to disable the physics like in gazebo? I don't need it and hope to speed up the simulation like that.

Flatland ROS2 Foxy not working

Hey, i followed the install instructions(i branch the ros2-foxy-plugins).
After i do colcon build i getting some errors:

--- stderr: flatland_server                                 
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/geometry.cpp:88:2: warning: extra ‘;’ [-Wpedantic]
   88 | };
      |  ^
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/model_body.cpp:190:2: warning: extra ‘;’ [-Wpedantic]
  190 | };
      |  ^
In file included from /home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/model.cpp:50:
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/include/flatland_server/model.h: In constructor ‘flatland_server::Model::Model(std::shared_ptr<rclcpp::Node>, b2World*, flatland_server::CollisionFilterRegistry*, const string&, const string&)’:
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/include/flatland_server/model.h:73:28: warning: ‘flatland_server::Model::cfr_’ will be initialized after [-Wreorder]
   73 |   CollisionFilterRegistry *cfr_;     ///< Collision filter registry
      |                            ^~~~
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/include/flatland_server/model.h:72:14: warning:   ‘flatland_server::YamlReader flatland_server::Model::plugins_reader_’ [-Wreorder]
   72 |   YamlReader plugins_reader_;        ///< for storing plugins when paring YAML
      |              ^~~~~~~~~~~~~~~
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/model.cpp:54:1: warning:   when initialized here [-Wreorder]
   54 | Model::Model(std::shared_ptr<rclcpp::Node> node, b2World *physics_world, CollisionFilterRegistry *cfr,
      | ^~~~~
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/layer.cpp: In constructor ‘flatland_server::Layer::Layer(std::shared_ptr<rclcpp::Node>, b2World*, flatland_server::CollisionFilterRegistry*, const std::vector<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char> > >&, const flatland_server::Color&, const YAML::Node&)’:
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/layer.cpp:108:66: warning: unused parameter ‘color’ [-Wunused-parameter]
  108 |              const std::vector<std::string> &names, const Color &color,
      |                                                     ~~~~~~~~~~~~~^~~~~
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/layer.cpp:109:32: warning: unused parameter ‘properties’ [-Wunused-parameter]
  109 |              const YAML::Node &properties)
      |              ~~~~~~~~~~~~~~~~~~^~~~~~~~~~
In file included from /home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/world.cpp:51:
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/include/flatland_server/world.h: In constructor ‘flatland_server::World::World(std::shared_ptr<rclcpp::Node>)’:
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/include/flatland_server/world.h:82:8: warning: ‘flatland_server::World::service_paused_’ will be initialized after [-Wreorder]
   82 |   bool service_paused_;  ///< indicates if simulation is paused by a service
      |        ^~~~~~~~~~~~~~~
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/include/flatland_server/world.h:81:17: warning:   ‘flatland_server::PluginManager flatland_server::World::plugin_manager_’ [-Wreorder]
   81 |   PluginManager plugin_manager_;  ///< for loading and updating plugins
      |                 ^~~~~~~~~~~~~~~
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/world.cpp:61:1: warning:   when initialized here [-Wreorder]
   61 | World::World(std::shared_ptr<rclcpp::Node> node)
      | ^~~~~
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/interactive_marker_manager.cpp: In member function ‘void flatland_server::InteractiveMarkerManager::processMouseDownFeedback(const ConstSharedPtr&)’:
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/interactive_marker_manager.cpp:200:79: warning: unused parameter ‘feedback’ [-Wunused-parameter]
  200 |     const visualization_msgs::msg::InteractiveMarkerFeedback::ConstSharedPtr &feedback) {
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/interactive_marker_manager.cpp: In member function ‘void flatland_server::InteractiveMarkerManager::processPoseUpdateFeedback(const ConstSharedPtr&)’:
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/interactive_marker_manager.cpp:205:79: warning: unused parameter ‘feedback’ [-Wunused-parameter]
  205 |     const visualization_msgs::msg::InteractiveMarkerFeedback::ConstSharedPtr &feedback) {
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/dummy_world_plugin.cpp: In member function ‘virtual void flatland_plugins::DummyWorldPlugin::OnInitialize(const YAML::Node&, flatland_server::YamlReader&)’:
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/dummy_world_plugin.cpp:57:55: warning: unused parameter ‘plugin_reader’ [-Wunused-parameter]
   57 | void DummyWorldPlugin::OnInitialize(const YAML::Node &plugin_reader, YamlReader &world_config) {
      |                                     ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/dummy_world_plugin.cpp:57:82: warning: unused parameter ‘world_config’ [-Wunused-parameter]
   57 | void DummyWorldPlugin::OnInitialize(const YAML::Node &plugin_reader, YamlReader &world_config) {
      |                                                                      ~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/dummy_model_plugin.cpp:47:
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/include/flatland_server/dummy_model_plugin.h:76:2: warning: extra ‘;’ [-Wpedantic]
   76 | };
      |  ^
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/service_manager.cpp: In member function ‘bool flatland_server::ServiceManager::SpawnModel(std::shared_ptr<rmw_request_id_t>, std::shared_ptr<flatland_msgs::srv::SpawnModel_Request_<std::allocator<void> > >, std::shared_ptr<flatland_msgs::srv::SpawnModel_Response_<std::allocator<void> > >)’:
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/service_manager.cpp:89:73: warning: unused parameter ‘request_header’ [-Wunused-parameter]
   89 | bool ServiceManager::SpawnModel(const std::shared_ptr<rmw_request_id_t> request_header,
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/service_manager.cpp: In member function ‘bool flatland_server::ServiceManager::DeleteModel(std::shared_ptr<rmw_request_id_t>, std::shared_ptr<flatland_msgs::srv::DeleteModel_Request_<std::allocator<void> > >, std::shared_ptr<flatland_msgs::srv::DeleteModel_Response_<std::allocator<void> > >)’:
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/service_manager.cpp:116:45: warning: unused parameter ‘request_header’ [-Wunused-parameter]
  116 |     const std::shared_ptr<rmw_request_id_t> request_header,
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/service_manager.cpp: In member function ‘bool flatland_server::ServiceManager::MoveModel(std::shared_ptr<rmw_request_id_t>, std::shared_ptr<flatland_msgs::srv::MoveModel_Request_<std::allocator<void> > >, std::shared_ptr<flatland_msgs::srv::MoveModel_Response_<std::allocator<void> > >)’:
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/service_manager.cpp:134:72: warning: unused parameter ‘request_header’ [-Wunused-parameter]
  134 | bool ServiceManager::MoveModel(const std::shared_ptr<rmw_request_id_t> request_header,
      |                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/service_manager.cpp: In member function ‘bool flatland_server::ServiceManager::Pause(std::shared_ptr<rmw_request_id_t>, std::shared_ptr<std_srvs::srv::Empty_Request_<std::allocator<void> > >, std::shared_ptr<std_srvs::srv::Empty_Response_<std::allocator<void> > >)’:
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/service_manager.cpp:154:68: warning: unused parameter ‘request_header’ [-Wunused-parameter]
  154 | bool ServiceManager::Pause(const std::shared_ptr<rmw_request_id_t> request_header,
      |                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/service_manager.cpp:155:81: warning: unused parameter ‘request’ [-Wunused-parameter]
  155 |                            const std::shared_ptr<std_srvs::srv::Empty::Request> request,
      |                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/service_manager.cpp:156:76: warning: unused parameter ‘response’ [-Wunused-parameter]
  156 |                            std::shared_ptr<std_srvs::srv::Empty::Response> response) {
      |                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/service_manager.cpp: In member function ‘bool flatland_server::ServiceManager::Resume(std::shared_ptr<rmw_request_id_t>, std::shared_ptr<std_srvs::srv::Empty_Request_<std::allocator<void> > >, std::shared_ptr<std_srvs::srv::Empty_Response_<std::allocator<void> > >)’:
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/service_manager.cpp:161:69: warning: unused parameter ‘request_header’ [-Wunused-parameter]
  161 | bool ServiceManager::Resume(const std::shared_ptr<rmw_request_id_t> request_header,
      |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/service_manager.cpp:162:81: warning: unused parameter ‘request’ [-Wunused-parameter]
  162 |                            const std::shared_ptr<std_srvs::srv::Empty::Request> request,
      |                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/service_manager.cpp:163:76: warning: unused parameter ‘response’ [-Wunused-parameter]
  163 |                            std::shared_ptr<std_srvs::srv::Empty::Response> response) {
      |                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/service_manager.cpp: In member function ‘bool flatland_server::ServiceManager::TogglePause(std::shared_ptr<rmw_request_id_t>, std::shared_ptr<std_srvs::srv::Empty_Request_<std::allocator<void> > >, std::shared_ptr<std_srvs::srv::Empty_Response_<std::allocator<void> > >)’:
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/service_manager.cpp:168:74: warning: unused parameter ‘request_header’ [-Wunused-parameter]
  168 | bool ServiceManager::TogglePause(const std::shared_ptr<rmw_request_id_t> request_header,
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/service_manager.cpp:169:87: warning: unused parameter ‘request’ [-Wunused-parameter]
  169 |                                  const std::shared_ptr<std_srvs::srv::Empty::Request> request,
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/service_manager.cpp:170:82: warning: unused parameter ‘response’ [-Wunused-parameter]
  170 |                                  std::shared_ptr<std_srvs::srv::Empty::Response> response) {
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/service_manager.cpp: At global scope:
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/service_manager.cpp:174:2: warning: extra ‘;’ [-Wpedantic]
  174 | };
      |  ^
In file included from /home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/test/collision_filter_registry_test.cpp:48:
/opt/ros/foxy/src/gtest_vendor/include/gtest/gtest.h: In instantiation of ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int; T2 = int]’:
/opt/ros/foxy/src/gtest_vendor/include/gtest/gtest.h:1495:23:   required from ‘static testing::AssertionResult testing::internal::EqHelper<lhs_is_null_literal>::Compare(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int; T2 = int; bool lhs_is_null_literal = false]’
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/test/collision_filter_registry_test.cpp:66:3:   required from here
/opt/ros/foxy/src/gtest_vendor/include/gtest/gtest.h:1467:11: warning: comparison of integer expressions of different signedness: ‘const long unsigned int’ and ‘const int’ [-Wsign-compare]
 1467 |   if (lhs == rhs) {
      |       ~~~~^~~~~~
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/flatland_server_node.cpp: In constructor ‘FlatlandServerNode::FlatlandServerNode()’:
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/flatland_server_node.cpp:79:50: error: no matching function for call to ‘FlatlandServerNode::declare_parameter<std::string>(const char [11])’
   79 |       declare_parameter<std::string>("world_path");
      |                                                  ^
In file included from /opt/ros/foxy/include/rclcpp/node.hpp:1224,
                 from /opt/ros/foxy/include/rclcpp/executors/single_threaded_executor.hpp:28,
                 from /opt/ros/foxy/include/rclcpp/executors.hpp:22,
                 from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:146,
                 from /home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/flatland_server_node.cpp:47:
/opt/ros/foxy/include/rclcpp/node_impl.hpp:157:1: note: candidate: ‘auto rclcpp::Node::declare_parameter(const string&, const ParameterT&, const ParameterDescriptor&, bool) [with ParameterT = std::__cxx11::basic_string<char>; std::string = std::__cxx11::basic_string<char>; rcl_interfaces::msg::ParameterDescriptor = rcl_interfaces::msg::ParameterDescriptor_<std::allocator<void> >]’
  157 | Node::declare_parameter(
      | ^~~~
/opt/ros/foxy/include/rclcpp/node_impl.hpp:157:1: note:   candidate expects 4 arguments, 1 provided
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/flatland_server_node.cpp:80:45: error: no matching function for call to ‘FlatlandServerNode::declare_parameter<float>(const char [12])’
   80 |       declare_parameter<float>("update_rate");
      |                                             ^
In file included from /opt/ros/foxy/include/rclcpp/node.hpp:1224,
                 from /opt/ros/foxy/include/rclcpp/executors/single_threaded_executor.hpp:28,
                 from /opt/ros/foxy/include/rclcpp/executors.hpp:22,
                 from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:146,
                 from /home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/flatland_server_node.cpp:47:
/opt/ros/foxy/include/rclcpp/node_impl.hpp:157:1: note: candidate: ‘auto rclcpp::Node::declare_parameter(const string&, const ParameterT&, const ParameterDescriptor&, bool) [with ParameterT = float; std::string = std::__cxx11::basic_string<char>; rcl_interfaces::msg::ParameterDescriptor = rcl_interfaces::msg::ParameterDescriptor_<std::allocator<void> >]’
  157 | Node::declare_parameter(
      | ^~~~
/opt/ros/foxy/include/rclcpp/node_impl.hpp:157:1: note:   candidate expects 4 arguments, 1 provided
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/flatland_server_node.cpp:81:43: error: no matching function for call to ‘FlatlandServerNode::declare_parameter<float>(const char [10])’
   81 |       declare_parameter<float>("step_size");
      |                                           ^
In file included from /opt/ros/foxy/include/rclcpp/node.hpp:1224,
                 from /opt/ros/foxy/include/rclcpp/executors/single_threaded_executor.hpp:28,
                 from /opt/ros/foxy/include/rclcpp/executors.hpp:22,
                 from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:146,
                 from /home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/flatland_server_node.cpp:47:
/opt/ros/foxy/include/rclcpp/node_impl.hpp:157:1: note: candidate: ‘auto rclcpp::Node::declare_parameter(const string&, const ParameterT&, const ParameterDescriptor&, bool) [with ParameterT = float; std::string = std::__cxx11::basic_string<char>; rcl_interfaces::msg::ParameterDescriptor = rcl_interfaces::msg::ParameterDescriptor_<std::allocator<void> >]’
  157 | Node::declare_parameter(
      | ^~~~
/opt/ros/foxy/include/rclcpp/node_impl.hpp:157:1: note:   candidate expects 4 arguments, 1 provided
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/flatland_server_node.cpp:82:41: error: no matching function for call to ‘FlatlandServerNode::declare_parameter<bool>(const char [9])’
   82 |       declare_parameter<bool>("show_viz");
      |                                         ^
In file included from /opt/ros/foxy/include/rclcpp/node.hpp:1224,
                 from /opt/ros/foxy/include/rclcpp/executors/single_threaded_executor.hpp:28,
                 from /opt/ros/foxy/include/rclcpp/executors.hpp:22,
                 from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:146,
                 from /home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/flatland_server_node.cpp:47:
/opt/ros/foxy/include/rclcpp/node_impl.hpp:157:1: note: candidate: ‘auto rclcpp::Node::declare_parameter(const string&, const ParameterT&, const ParameterDescriptor&, bool) [with ParameterT = bool; std::string = std::__cxx11::basic_string<char>; rcl_interfaces::msg::ParameterDescriptor = rcl_interfaces::msg::ParameterDescriptor_<std::allocator<void> >]’
  157 | Node::declare_parameter(
      | ^~~~
/opt/ros/foxy/include/rclcpp/node_impl.hpp:157:1: note:   candidate expects 4 arguments, 1 provided
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/flatland_server_node.cpp:83:46: error: no matching function for call to ‘FlatlandServerNode::declare_parameter<float>(const char [13])’
   83 |       declare_parameter<float>("viz_pub_rate");
      |                                              ^
In file included from /opt/ros/foxy/include/rclcpp/node.hpp:1224,
                 from /opt/ros/foxy/include/rclcpp/executors/single_threaded_executor.hpp:28,
                 from /opt/ros/foxy/include/rclcpp/executors.hpp:22,
                 from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:146,
                 from /home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/src/flatland_server_node.cpp:47:
/opt/ros/foxy/include/rclcpp/node_impl.hpp:157:1: note: candidate: ‘auto rclcpp::Node::declare_parameter(const string&, const ParameterT&, const ParameterDescriptor&, bool) [with ParameterT = float; std::string = std::__cxx11::basic_string<char>; rcl_interfaces::msg::ParameterDescriptor = rcl_interfaces::msg::ParameterDescriptor_<std::allocator<void> >]’
  157 | Node::declare_parameter(
      | ^~~~
/opt/ros/foxy/include/rclcpp/node_impl.hpp:157:1: note:   candidate expects 4 arguments, 1 provided
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/test/plugin_manager_test.cpp: In member function ‘virtual void TestModelPlugin::OnInitialize(const YAML::Node&)’:
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/test/plugin_manager_test.cpp:86:39: warning: unused parameter ‘config’ [-Wunused-parameter]
   86 |   void OnInitialize(const YAML::Node &config) override {
      |                     ~~~~~~~~~~~~~~~~~~^~~~~~
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/test/plugin_manager_test.cpp: In member function ‘virtual void TestModelPlugin::BeforePhysicsStep(const flatland_server::Timekeeper&)’:
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/test/plugin_manager_test.cpp:90:44: warning: unused parameter ‘timekeeper’ [-Wunused-parameter]
   90 |   void BeforePhysicsStep(const Timekeeper &timekeeper) override {
      |                          ~~~~~~~~~~~~~~~~~~^~~~~~~~~~
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/test/plugin_manager_test.cpp: In member function ‘virtual void TestModelPlugin::AfterPhysicsStep(const flatland_server::Timekeeper&)’:
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/test/plugin_manager_test.cpp:94:43: warning: unused parameter ‘timekeeper’ [-Wunused-parameter]
   94 |   void AfterPhysicsStep(const Timekeeper &timekeeper) override {
      |                         ~~~~~~~~~~~~~~~~~~^~~~~~~~~~
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/test/plugin_manager_test.cpp: In member function ‘virtual void TestModelPlugin::PreSolve(b2Contact*, const b2Manifold*)’:
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/test/plugin_manager_test.cpp:108:55: warning: unused parameter ‘oldManifold’ [-Wunused-parameter]
  108 |   void PreSolve(b2Contact *contact, const b2Manifold *oldManifold) override {
      |                                     ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/test/plugin_manager_test.cpp: In member function ‘virtual void TestModelPlugin::PostSolve(b2Contact*, const b2ContactImpulse*)’:
/home/nartmangnourt/ros2_ws/src/utils/flatland/flatland_server/test/plugin_manager_test.cpp:113:62: warning: unused parameter ‘impulse’ [-Wunused-parameter]
  113 |   void PostSolve(b2Contact *contact, const b2ContactImpulse *impulse) override {
      |                                      ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
make[2]: *** [CMakeFiles/flatland_server.dir/build.make:76: CMakeFiles/flatland_server.dir/src/flatland_server_node.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:195: CMakeFiles/flatland_server.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:146: all] Error 2
---
Failed   <<< flatland_server [24.9s, exited with code 2]

Do you have any ideas?
Thank you in advance:)

Deleting layers from world and loading new layers instead

Hi everyone,
im currently working on the simulation_manager.cpp. My goal is to load new layers from bitmap png files on every episode while training and deleting the old layers. For this purpose i wrote a ros::Subscriber inside the simulation_manager.cpp and defined a callback function.

ros::Subscriber goal_sub = n.subscribe("/goal", 1, &SimulationManager::callback_goal, this);
void SimulationManager::callback_goal(geometry_msgs::PoseStamped goal_msg) {
    YamlReader world_reader = YamlReader(map_layer_yaml_file_);
    YamlReader layers_reader = world_reader.Subnode("layers", YamlReader::LIST);
    for (auto &layer : world_->layers_) { // delete layers
      if (layer->body_ != nullptr) {
        layer->body_->physics_body_ = nullptr;
      }
      delete layer;
    }

    world_->cfr_.layer_id_table_.clear(); // empty the layer_id_table

    world_->LoadLayers(layers_reader); // load "map" layer from png file
    world_->DebugVisualize();
  }

During roslaunch i start the simulation with an empty map

properties:
  velocity_iterations: 10
  position_iterations: 10
layers:
- name: static
  map: empty.yaml
  color: [0, 1, 0, 1]

and afterwards use world_->LoadLayers(layers_reader); to load the real map for training via this yaml file:

properties:
  velocity_iterations: 10
  position_iterations: 10
layers:
- name: map
  map: map.yaml
  color: [0, 0, 1, 1]

This works for the first episode of training and the visualization works as well, but flatland server process dies after the first episode.

[flatland_server-2] process has died [pid 9515, exit code -11, cmd /home/ducanor/catkin_ws/devel/lib/flatland_server/flatland_server __name:=flatland_server __log:=/home/ducanor/.ros/log/978f8eb0-d9aa-11eb-8ae5-00155d6d5b70/flatland_server-2.log].
log file: /home/ducanor/.ros/log/978f8eb0-d9aa-11eb-8ae5-00155d6d5b70/flatland_server-2*.log

My guess is that there is a problem with the deleting during the callback. Maybe "map" layer is not deleted properly and this causes the process to die.

P.S.: I tried without deleting, but this causes the process to die after loading layers the maximum amount of times (16). The layers will not be overwritten.

ROS Distro

For which ROS is Flatland Compatible.?
I tried running it on Ros-Kinetic and there are errors in Library libflatland_lib.so
Have you experienced this before?

Support optional prefix for topics and namespaces to aid in multi-robot support

  • TF should string-prefix the prefix ("base" with prefix "foo" becomes "foo-base").
  • Topics should use prefix as namespace ( "cmd_vel" becomes "foo/cmd_vel"

The flatland API should provide functions to prefix topics and tfs so that all plugins can use this consistently.

Prefixes should default to "", which should not do anything to the string (no "-" or "/" prefix added).

What is these parameter?

I saw thses parameter in map.world.yaml
position_iterations & velocity_iterations.
what are they?
When they are setting 0& 0 , then robot and other obstacle is not slip? or there is no friction in the simulator?

Question: Need for flatland?

I am currently considering picking up one 2 (2.5D) simulator and would like to ask what specific use case led you to build this package as opposed to using existing solutions such as stage or stdr?

Watched the ROSCon ligthning talk but missed this comparison.

ROS topic names ignore namespace configuration when spawning multiple robots of the same model

Hi! There seems to be a bug in the way ROS topic names are loaded in various plugins.

How to reproduce

Add a laser plugin to a robot model:

plugins:
  - type: Laser
    name: laser_front
    frame: laser_front
    topic: scan2
    body: base2
    broadcast_tf: true
    origin: [0.28, 0, 0]
    range: 20
    angle: {min: -2.356194490192345, max: 2.356194490192345, increment: 0.004363323129985824}
    noise_std_dev: 0.05
    update_rate: 40

Launch a flatland_server node with the following world configuration file and see how both robots publish on the same topic (/scan2):

models:
  - name: turtlebot1
    namespace: robot1
    pose: [0, 0, 0]
    model: "turtlebot.model.yaml"
    
  - name: turtlebot2
    namespace: robot2
    pose: [0, 1, 0]
    model: "turtlebot.model.yaml"

Cause

In flatland_server/src/model.cpp there is a function called NameSpaceTopic used to prepend the namespace to the topic name before creating a publisher.

Currently, this is only used in bool_sensor.cpp but it should probably be added to other plugins, like laser.cpp.

Independent tests of localization and navigation?

What's the recommended way of testing navigation and localization independently on Flatland?

For context, I'm trying to tune move_base parameters using flatland. However, when I run flatland at >10x real time, cartographer (I'm testing cartographer as a replacement to AMCL) loses its ability to localize correctly on the map (likely due to asynchronous optimizations and updates within cartographer). I'd like to be able to test the effects of various parameter values in move_base independent of cartographer's issues. Is there a way, without starting flatland_viz, to get the map, the odom, and the transforms from map to base_link from flatland?

Intermittant CI failure in service manager test

[flatland_server.rosunit-service_manager_test/move_model][FAILURE]--------------
/root/catkin_ws/src/flatland/flatland_server/test/service_manager_test.cpp:201
The difference between 9.9 and w->models_[0]->bodies_[0]->physics_body_->GetPosition().y is 0.00042114257812464473, which exceeds 1e-4, where
9.9 evaluates to 9.9000000000000004,
w->models_[0]->bodies_[0]->physics_body_->GetPosition().y evaluates to 9.900421142578125, and
1e-4 evaluates to 0.0001.

Spawn model tool doesn't use outline of model

Currently the spawn model tool uses a static 3d model that doesn't match the model to preview the shape being placed. It should either use a more generic shape (an arrow etc.) or parse the model yaml to generate a footprint shape dynamically.

Laser scan Clockwise or Counterclockwise?

Is the scan generated and then interpreted clockwise or counterclockwise?
When training a model with flatland, the evaluation in the simulation is great, but when deploying onto the turtlebot3, the robot doesn't do what it should. The assumption is that the scan data is not interpreted correctly.
The turtlebot3 generates its scan data counterclockwise.

Laserscan and Marker visualization don't agree

I have people (modeled with two circles for the legs) walking around. They follow a specified path.
For that I apply velocities and position transformations to the models.
As result, the marker visualization is doing what's expected, but the laser scan data isn't. The legs are registered at the right position, but not in the right orientation. It is always the initialized orientation ( 0° --> see image).
If I remove the absolute transformations and just apply linear and angular transformations, the error remains.
scan_marker_viz

Disable models?

Hi,
I was wondering if there is an elegant way to disable models completely (not considered by the simulation). And if needed enable it again. I figured, that loading and deleting models is quite time consuming and I would like to avoid that.
I appreciate any help/hint.
Br,
Ronja

How do I speed up the simulation ?

Is there a way to speed up the simulation time? I belive it runs in real time .

I am sorry if this sounds trivial but I'm quite new to flatland

Build instructions in docs or README

building this package requires dependency installations. I found through trial and error to install lua5.3 and liblua5.3-dev, but some explicit instructions would be nice.

Dynamic footprint?

I would like to simulate a walking person (i.e. legs) with two circles, moving back and forward over time. Is it possible to have dynamic models with changing footprints? I didn't find the appropriate interface...

Problems using Laser plugin

Hello. First I would like to thank you for the development of flatland. It's a very interesting project.

Unfortunately I am unable to use the Laser plugin.
The laser rays do not appear in the simulator and when I use it on the robot, even when I move it around the map (teleop via twist messages) the values of the scan topic never change. If I change the robot's initial position, the values change. It's as if the laser isn't moving with the robot after initializing on the map.

Any tips for beginners? I've read the site's documentation but haven't found anything that I could be doing wrong.

I am attaching my world and robot files (just renamed to .txt for upload purpose). Maybe it can help.
turtlebot2.model.yaml.txt
world.yaml.txt

Thanks in advance.

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.