Gazebo | Ignition | Community
Ask Your Question

nzlz's profile - activity

2021-01-21 01:15:58 -0500 received badge  Famous Question (source)
2021-01-21 01:15:58 -0500 received badge  Notable Question (source)
2021-01-21 01:15:10 -0500 received badge  Favorite Question (source)
2019-12-10 02:22:07 -0500 received badge  Famous Question (source)
2019-12-10 02:22:07 -0500 received badge  Notable Question (source)
2019-04-03 04:44:13 -0500 received badge  Nice Question (source)
2019-04-03 04:44:10 -0500 received badge  Famous Question (source)
2019-04-02 16:26:55 -0500 received badge  Notable Question (source)
2019-04-02 12:26:32 -0500 received badge  Popular Question (source)
2019-04-02 06:08:50 -0500 asked a question Friction in the gripper not working, objects slipping

Friction in the gripper not working, objects slipping Hi everyone, I am sorry I have to post a new "gripper slipping ob

2019-02-21 02:15:19 -0500 received badge  Nice Answer (source)
2019-02-07 11:49:35 -0500 received badge  Popular Question (source)
2019-01-29 02:30:10 -0500 asked a question http://gazebosim.org not working

http://gazebosim.org not working I get slow connection many times, and currently I can't even access. I need it mainly t

2019-01-28 12:09:35 -0500 received badge  Popular Question (source)
2019-01-27 23:39:53 -0500 asked a question Publishing gz_topic info to a ros2_topic

Publishing gz_topic info to a ros2_topic Hello everyone, I am trying to create a gazebo system plugin that publishes p

2019-01-15 11:43:40 -0500 received badge  Popular Question (source)
2019-01-15 05:22:13 -0500 marked best answer no matching function for call to ‘rclcpp::AnyServiceCallback<gazebo_msgs::srv::GetModelList>::set

I am porting get_world_properties to ros2 with the name get_model_list, and I am facing the following error in the updated gazebo_ros_factory.cpp.

The new update mainly contains a new GetModelList.srv (empty request, possible cause of the error?) and a GetModelList function in the gazebo_ros_factory plugin. I suspect the error is somewhere in the creation of the new service (model_list_service_ = ros_node_->create_service .......).

The whole code is available at: https://github.com/nzlz/gazebo_ros_pk...

Thanks in advance!

Error:

nestor@n-pc:~/gz_ws_ros2$ colcon build --merge-install --packages-select gazebo_ros
Starting >>> gazebo_ros
--- stderr: gazebo_ros                             
In file included from /opt/ros/crystal/include/rclcpp/node_impl.hpp:42:0,
                 from /opt/ros/crystal/include/rclcpp/node.hpp:492,
                 from /opt/ros/crystal/include/rclcpp/executors/single_threaded_executor.hpp:28,
                 from /opt/ros/crystal/include/rclcpp/executors.hpp:22,
                 from /opt/ros/crystal/include/rclcpp/rclcpp.hpp:144,
                 from /home/nestor/gz_ws_ros2/src/gazebo_ros_pkgs/gazebo_ros/include/gazebo_ros/node.hpp:18,
                 from /home/nestor/gz_ws_ros2/src/gazebo_ros_pkgs/gazebo_ros/src/gazebo_ros_factory.cpp:28:
/opt/ros/crystal/include/rclcpp/create_service.hpp: In instantiation of ‘typename rclcpp::Service<ServiceT>::SharedPtr rclcpp::create_service(std::shared_ptr<rclcpp::node_interfaces::NodeBaseInterface>, std::shared_ptr<rclcpp::node_interfaces::NodeServicesInterface>, const string&, CallbackT&&, const rmw_qos_profile_t&, rclcpp::callback_group::CallbackGroup::SharedPtr) [with ServiceT = gazebo_msgs::srv::GetModelList; CallbackT = std::_Bind<void (gazebo_ros::GazeboRosFactoryPrivate::*(gazebo_ros::GazeboRosFactoryPrivate*, std::_Placeholder<2>))(std::shared_ptr<gazebo_msgs::srv::GetModelList_Response_<std::allocator<void> > >)>; typename rclcpp::Service<ServiceT>::SharedPtr = std::shared_ptr<rclcpp::Service<gazebo_msgs::srv::GetModelList> >; std::__cxx11::string = std::__cxx11::basic_string<char>; rmw_qos_profile_t = rmw_qos_profile_t; rclcpp::callback_group::CallbackGroup::SharedPtr = std::shared_ptr<rclcpp::callback_group::CallbackGroup>]’:
/opt/ros/crystal/include/rclcpp/node_impl.hpp:201:53:   required from ‘typename rclcpp::Service<ServiceT>::SharedPtr rclcpp::Node::create_service(const string&, CallbackT&&, const rmw_qos_profile_t&, rclcpp::callback_group::CallbackGroup::SharedPtr) [with ServiceT = gazebo_msgs::srv::GetModelList; CallbackT = std::_Bind<void (gazebo_ros::GazeboRosFactoryPrivate::*(gazebo_ros::GazeboRosFactoryPrivate*, std::_Placeholder<2>))(std::shared_ptr<gazebo_msgs::srv::GetModelList_Response_<std::allocator<void> > >)>; typename rclcpp::Service<ServiceT>::SharedPtr = std::shared_ptr<rclcpp::Service<gazebo_msgs::srv::GetModelList> >; std::__cxx11::string = std::__cxx11::basic_string<char>; rmw_qos_profile_t = rmw_qos_profile_t; rclcpp::callback_group::CallbackGroup::SharedPtr = std::shared_ptr<rclcpp::callback_group::CallbackGroup>]’
/home/nestor/gz_ws_ros2/src/gazebo_ros_pkgs/gazebo_ros/src/gazebo_ros_factory.cpp:141:29:   required from here
/opt/ros/crystal/include/rclcpp/create_service.hpp:43:3: error: no matching function for call to ‘rclcpp::AnyServiceCallback<gazebo_msgs::srv::GetModelList>::set(std::_Bind<void (gazebo_ros::GazeboRosFactoryPrivate::*(gazebo_ros::GazeboRosFactoryPrivate*, std::_Placeholder<2>))(std::shared_ptr<gazebo_msgs::srv::GetModelList_Response_<std::allocator<void> > >)>)’
   any_service_callback.set(std::forward<CallbackT>(callback));
   ^~~~~~~~~~~~~~~~~~~~
In file included from /opt/ros/crystal/include/rclcpp/service.hpp:27:0,
                 from /opt/ros/crystal/include/rclcpp/callback_group.hpp:24,
                 from /opt/ros/crystal/include/rclcpp/any_executable.hpp:20,
                 from /opt/ros/crystal/include/rclcpp/memory_strategy.hpp:24,
                 from /opt/ros/crystal/include/rclcpp/memory_strategies.hpp:18,
                 from /opt/ros/crystal/include/rclcpp/executor.hpp:32,
                 from /opt/ros/crystal/include/rclcpp/executors/multi_threaded_executor.hpp:24,
                 from /opt/ros/crystal/include/rclcpp/executors.hpp:21,
                 from /opt/ros/crystal/include/rclcpp/rclcpp.hpp:144,
                 from /home/nestor/gz_ws_ros2/src/gazebo_ros_pkgs/gazebo_ros/include/gazebo_ros/node.hpp:18,
                 from /home/nestor/gz_ws_ros2/src/gazebo_ros_pkgs/gazebo_ros/src ...
(more)
2019-01-15 05:21:54 -0500 received badge  Commentator
2019-01-15 05:21:54 -0500 commented answer no matching function for call to ‘rclcpp::AnyServiceCallback<gazebo_msgs::srv::GetModelList>::set

That worked, thanks!

2019-01-14 06:29:26 -0500 asked a question no matching function for call to ‘rclcpp::AnyServiceCallback<gazebo_msgs::srv::GetModelList>::set

no matching function for call to ‘rclcpp::AnyServiceCallback<gazebo_msgs::srv::getmodellist>::set I am porting get

2019-01-07 05:08:24 -0500 marked best answer [ros2] reset_world/reset_simulation fail with URDF

Hi everyone,

First of all I'm not sure if its correct to comment a still not accepted PR, so I'm just leaving this here. This is about Port time commands (pause / reset) PR.

I want to be able to reset my robot, but I'm not achieving the desired results with neither /reset_world nor /reset_simulation. Images are self explanatory, only the pure gazebo model works as expected, not the urdf.

  • In reset_world MARA model is not affected.
  • In reset_simulation MARA loses all joint forces, or something like that.

reset_world

reset_world

reset_simulation

reset_simulation

2019-01-07 05:08:12 -0500 commented answer [ros2] reset_world/reset_simulation fail with URDF

Thanks!! Removing negative time check + Adding initialization variables to Reset() fixed the issue. reset_simulation is

2019-01-04 15:52:36 -0500 received badge  Famous Question (source)
2019-01-04 09:39:18 -0500 commented answer [ros2] reset_world/reset_simulation fail with URDF

I want to mention also that I don't get any console error. The last message is:

2019-01-04 09:38:50 -0500 commented answer [ros2] reset_world/reset_simulation fail with URDF

The plugin I'm using is probably the failing part. But I really don't know how to proceed or what could be failing. (Res

2019-01-03 19:10:15 -0500 received badge  Notable Question (source)
2019-01-03 12:46:04 -0500 received badge  Popular Question (source)
2019-01-03 12:34:06 -0500 received badge  Supporter (source)
2019-01-03 10:30:22 -0500 asked a question [ros2] reset_world/reset_simulation fail with URDF

[ros2] reset_world/reset_simulation fail with URDF Hi everyone, First of all I'm not sure if its correct to comment a s

2018-12-24 07:37:03 -0500 commented answer SITL Gazebo, Reset model using code

I checked the code at gym-gazebo and APM is just launched again, from scratch. You could use delete_model and spawn_urdf

2018-12-21 02:56:43 -0500 answered a question SITL Gazebo, Reset model using code

A good way of resetting the simulation is to make use of the /gazebo/reset_world service provided by gazebo_ros_packages

2017-07-28 03:22:20 -0500 received badge  Famous Question (source)
2017-03-29 21:49:50 -0500 received badge  Famous Question (source)
2016-11-11 14:20:33 -0500 received badge  Notable Question (source)
2016-11-11 14:20:32 -0500 received badge  Popular Question (source)
2016-10-17 15:25:02 -0500 received badge  Famous Question (source)
2016-10-17 15:24:50 -0500 received badge  Notable Question (source)
2016-10-17 15:24:50 -0500 received badge  Popular Question (source)
2016-10-17 15:23:27 -0500 asked a question Model plugin resets model pose

Hi,

I am trying to change the position of my catapult model dynamically. I am able to change the pose but when I send a message to the plugin the model gets bugged. Any idea how to fix the following code so that the plugin does not affect the model pose? Full plugin available here .

public: void OnRosMsg(const catapult_control::CatapultConstPtr &_msg)
{
  this->SetVelocity(_msg->velocity);
  this->SetUpperLimit(_msg->upper_limit);
}

public: void SetVelocity(const double &_vel)
{
  this->model->GetJointController()->SetVelocityTarget(
      this->joint->GetScopedName(), _vel);
}

public: void SetUpperLimit(const double &_upper_limit)
{
  this->joint->SetHighStop(0,_upper_limit);
}
2016-09-26 11:16:17 -0500 received badge  Student (source)
2016-09-26 10:12:59 -0500 commented answer <gazebo reference=""> not loaded from urdf.xacro Gazebo6

Can you share your URDF file?

2016-09-26 08:21:59 -0500 commented answer <gazebo reference=""> not loaded from urdf.xacro Gazebo6

The URDF I tested is the following: https://gist.github.com/Nestor94Gonzalez/877adf2b7e63dda66ad0f3bc7f02096a . I just place that code before the final </robot> tag. Make sure you see 'wheel_f_l' as a model link in gazebo (some links are not visible in gazebo when using urdf). If the problem is the uri, you can replace the script part with this code: https://gist.github.com/Nestor94Gonzalez/54c7af6f134e2072d304e316d4ea9d88 .

2016-09-26 06:26:43 -0500 answered a question SetUpperLimit in plugin

Late, but someone may find this useful. Just use SetHighStop instead of SetUpperLimit. (works in gazebo 7)

2016-09-26 05:38:03 -0500 answered a question <gazebo reference=""> not loaded from urdf.xacro Gazebo6

The following code works for me:

  <gazebo reference="wheel_f_l">
    <visual>
      <material>
        <script>
          <uri>file://media/materials/scripts/gazebo.material</uri>
          <name>Gazebo/Black</name>
        </script>
        <emissive>0 0 0 1</emissive>
      </material>
    </visual>
  </gazebo>
2016-09-26 05:09:30 -0500 marked best answer Nondeterministic ball bounce[SOLVED]

Hello,

I am getting different behaviors with exactly the same execution and world settings. As you can see in this video , I reset the world every time and launch the ball with exactly the same velocity. This happens when launching the ball against any kind of surface (not only this board).

Update: more videos: vid2, vid3.

Ball model.sdf file:

<?xml version="1.0" ?>
<sdf version="1.5">
  <model name="basketball">
    <static>false</static>
    <self_collide>true</self_collide>
    <link name="ball">
      <inertial>
        <mass>0.25</mass>
        <!-- inertia based on solid sphere 2/5 mr^2 -->
        <inertia>
          <ixx>0.00169</ixx>
          <iyy>0.00169</iyy>
          <izz>0.00169</izz>
          <ixy>0</ixy>
          <ixz>0</ixz>
          <iyz>0</iyz>
        </inertia>
      </inertial>
      <visual name="visual">
        <geometry>
          <sphere>
            <radius>0.13</radius>
          </sphere>
        </geometry>
      </visual>
      <collision name="collision">
        <geometry>
          <sphere>
            <radius>0.13</radius>
          </sphere>
        </geometry>
        <surface>
          <bounce>
            <restitution_coefficient>0.5</restitution_coefficient>
            <threshold>0.1</threshold>
          </bounce>
          <contact>
            <ode>
              <max_vel>5</max_vel>
              <min_depth>0.0001</min_depth>
            </ode>
          </contact>
        </surface>
      </collision>
    </link>
  </model>
</sdf>
2016-09-26 05:09:30 -0500 received badge  Scholar (source)