2017-09-27 23:03:29 -0600 received badge ● Nice Answer (source) 2017-07-24 13:19:12 -0600 received badge ● Famous Question (source) 2016-10-20 21:51:59 -0600 marked best answer A joint with high couple but small speed Hi, I want to make a joint that can't move fast but still have a high couple. To action this joint I use the class JointController and PID. This joint is now unstable and I would like to find a way to limit its max velocity (which is not directly implemented). This would give me the opportunity to use a strong PID and would simpliy its parameterisation. To give you an id, one way of doing is to increase a lot the inertials values of the links, and then use a PID with very high values of P, I and D. But since I want to keep my inertial realistic, I can't do this anymore. I tried then to use the friction parameter of the joint, but this is not exactly what I need because it doesn't imply a max speed, but more a leak of energy when applying forces. Any idea would be welcome ! Cheers. 2016-05-30 08:46:58 -0600 answered a question High values of friction explanation I think the answer you linked is pretty good. Two factors are to be explained: Physics says that friction can be higher than 1 (there is a mistake in the documentation of ODE), even if most materials are between 0 and 1. In case of contact, ODE will take the lowest friction parameter of the two materials colliding. Choosing an extremely high value for the ground is a way to avoid limitation, i.e. this is your models parameters that should always be taken in account. 2016-05-12 09:41:46 -0600 answered a question why do we need the sdf element "collide with contact"? It's quite common to disable contact when running tests. This depends on what you're working on... 2016-04-29 07:53:04 -0600 answered a question JointController: Does the PID calculate torque to apply to joint? If you have a doubt because the documentation isn't precise enough, just check the code directly on Bitbucket: https://bitbucket.org/osrf/gazebo/src... For position PIDs, here is how it uses the common::PID class and the SetForce() function: double cmd = this->dataPtr->posPids[iter->first].Update(this->dataPtr->joints[iter->first]->GetAngle(0).Radian() - iter->second, stepTime); this->dataPtr->joints[iter->first]->SetForce(0, cmd);  2016-04-10 16:01:50 -0600 commented question Wrong direction of gravity To my experience, this kind of error can apper for two reasons: 1) Two joined link have a difference of inertials in an order of magnitude higher than 10. 2) The iterations for the physic engine solver are two low. Can you verify that ? 2016-03-16 12:53:17 -0600 received badge ● Notable Question (source) 2016-03-10 06:01:16 -0600 answered a question What are the SDF Damping Units? Hi There should be no unit I think, since we should have something like energy_loss = damping * joint_velocity. I did not run any test, but one could run a simulation with two balls (one with damping, the other one without) fixed to the ground by prismatic joints and log information about velocity. 2016-02-17 18:31:59 -0600 marked best answer Can't get self_collide working arm.worldHi everybody, I'm building a simple arm robot. I built a world containing the ground, a sun and my arm. Then I simply launch the world using the command "gazebo arm.world" and let my arm robot fall down. But the several links of the robot don't collide. I put the tag "" to "true" in my arm model and I also tried to use a model_plugin to programmatically set the "self_collide" attribute for each link to "true". Does anyone have an idea why there is no collision ? (I looked with the view->collision but nothing happens). Could it be because my links don't have any inertial properties ? I just need the two fingers of the arm to collide together but have no idea how to process... Cheers, Debz 2016-02-17 18:29:39 -0600 marked best answer Using ROS without gazebo_ros_pkgs ? Hi, I made a project using Gazebo and plugins to simulate a Robot. ROS is now not even installed on my computer. I wonder if I can use the roscpp librairy to integrate ROS in my project, without using the gazebo_ros_pkgs. The reason why I want to do like this is that I would like to compare my own IK algorithm to common ones available with ROS, and therefore integrate ROS in my Gazebo model_plugin. As you might guess, I don't really know the ROS environnement. Just tell me if my question doesn't make sens! Best. 2016-02-17 18:28:44 -0600 marked best answer Need advices for a project with a robot arm Hi, I start working with gazebo and ask you for some advices. I need to set up a simulation of a very simple robot arm trying to grab things around itself. The idea is to use this simulation to try some learning algorithm. (the task to learn is to grap things). This simulation must respect some rules: it must be computationally light (few degrees of freedom, no heavy rendering...) the code must be as simple as possible These are the questions I faced this last month: Do I need to use ROS ? It sounds convenient for simulating a PID controller but I fear that I could not handle everything happening in the simulation if I use it. Is it possible to simulate a PID controller in Gazebo just using a Model or Joint Plugins ? Where can I find a good documentation about the physic engine (which might be ODE in my case) ? I often wonder where I can find the default parameters used by gazebo when I load a simple model. I would be grateful if you could share your experience with me. EDIT: Up to now I could build an arm and make it grab a box using PID in a controller. My question is pretty simple, if I had to use ROS for any reason, would be the implementation of this arm grabbing things very different ? What would be roughly the architecture of this project using ROS ? 2016-02-17 18:28:21 -0600 marked best answer Finger contact: ERP, CFM, Kp and Kd Hi everyone, I have a world where a 2-fingers-arm tries to pick up a box. I'm wondering how I can simulate the best the fact that the skin of our fingers is deformable and make it way easier to grab things. The deformation of the skin actually make the contact surface bigger and stabilize the objects we hold. Until now, the fingers of the simulated arm have the following surface parameters (I set a high damping and a small spring parameters and get an interpenetration between the fingers and the objects they grab).  0.5 0.5 0.01 0.01 0.1 0.8 0.8 2500 10 0.001  But it doesn't change the fact that the joint contact is operating in one point. As a result, the grabbed object is held between two contact points (one for each finger) and has one degree of freedom (the rotation in the axis of the two points). I would like to get multiple contacts for each finger in order to prevent any rotation of the object the arm grab. Does anyone have an idea how to simulate that ? I hope I was clear. Cheers 2016-02-17 18:27:53 -0600 received badge ● Famous Question (source) 2016-02-17 18:21:05 -0600 received badge ● Famous Question (source) 2016-02-17 11:50:11 -0600 received badge ● Nice Answer (source) 2016-02-17 09:51:38 -0600 answered a question Setting joint positions without using a PID Controller I might suggest you to use a P controller (set I and D parameters to zero) and increase the damping of your joints. You'll get almost what you want. The damping prevents the PID to oscillate or diverge, and using a PID controller is the most integrated solution I know for gazebo. I use this solution to avoid PID tuning for a robot arm.  0 0 0 0 0 0 car wheel 0 1 0 3 1 1  2016-02-17 09:41:22 -0600 answered a question How to get the Acceleration of a Joint The acceleration is the derivative of the velocity and the velocity is the derivative of the position/angle. You can just create a small class, that keeps in memory the previous (or many previous) angle/velocity and get the acceleration from that. Typically, if you get the velocity of your joint at each iteration i, then the acceleration would be something like: accelaration[i] = (velocity[i-1] - velocity[i]) / (time[i-1] - time[i])  This is not perfectly exact since we should use: accelaration[i] = (velocity[i-1] - velocity[i+1]) / (time[i-1] - time[i+1])  But since we can't predict the future, it should give you good aproximation. An other way would be to use the force sum on your joint and compute the formula F = m.a but this requires much more knowledge and is too cumbersome.  2016-02-17 09:25:35 -0600 answered a question Opening a text file through a plugin Hi, I also use an external file for my current project. Here is the code: std::ifstream f(path.c_str(), std::ios::in);  Here, path is a std::string object. Be ware that the path is relative to the folder where you run gazebo, NOT relative to the folder of your plugin. If you know exactly where you run gazebo, then adapt your path or you can use an absolute path, as chapulina said. 2016-02-17 09:17:02 -0600 commented answer Bounding Box not updated Well seen, thx. 2016-02-17 09:16:47 -0600 received badge ● Popular Question (source) 2016-02-13 14:27:21 -0600 asked a question Bounding Box not updated Hi, I use the function GetCollisionBoundingBox() on a box model to get the minimun corner of this box (green point). From this point I compute two new points to grab the box with a robotic arm. This method works well as long as the box doesn't move. Then, if the box is moved, the min corner of the bounding is not correct anymore. You can see on the picture below what is happening. https://www.dropbox.com/s/41n4svs6m40... Dou you have an idea why this happens ? Does anyone know how the bounding box of an object is updated (I use ODE) ? Thx 2016-02-04 16:47:25 -0600 received badge ● Famous Question (source) 2016-01-21 00:15:10 -0600 received badge ● Nice Answer (source) 2016-01-15 13:36:12 -0600 commented answer can we apply motion on a link ? The PID seems to be the best option for you. With them, you can directly set angles to your joints (position PID vs velocity PID). 2016-01-14 11:35:49 -0600 commented answer Inertia matrices and double precision ODE The only small things I can suggest: - verify your inertials (using the gazebo client, view->inertials). They should fit to the collision geometry of your links. If only one link hasn't right inertial, the entire robot gets shaky. - I use the following parameters: max_step_size = 0.002, solver type = quick, sor = 1.4, constraints cfm = 0, erp = 1. 2016-01-14 11:30:16 -0600 received badge ● Enthusiast 2016-01-13 07:17:57 -0600 answered a question Inertia matrices and double precision ODE I think it is a recurrent problem. I faced the same instability with a recent project. What might happen is not that ODE can't handle small doubles variable as many previous topics suggest (inertial e-06 is quite OK). But the way your joints are defined might be the cause. If the inertials are small, then your links are easy to move. One link moves, disturb an other one through the joint that links them, and so on. This happens because your joints are too perfect, they transfer too much energy. At the end your robot shakes and can even explode. I solved my case by playing with these parameters (not all of them are necessarily relevant). Increasing damping limits the mutual physical actions between your links. Increasing friction set up a lower limit for velocity before the joints actually transfer the energy coming from the action of one of the links.  0 0 1 friction damping cfm_damping implicit_spring  I use these parameters (my damping is that hight because I use strong PID controllers on my joints. You'd better take a value between 0 and 1): friction = 0.01 damping = 6 cfm_damping = 1 implicit_spring = 1  I hope this helps. 2016-01-12 09:26:15 -0600 received badge ● Notable Question (source) 2016-01-12 08:11:13 -0600 received badge ● Famous Question (source) 2016-01-11 14:48:17 -0600 commented answer Some contacts not detected Hi, thx for your answer. Do you mean that I just need to subscribe and keep on working with the manager or I'd better use the topic subscription system to get the contacts ? 2016-01-11 11:05:28 -0600 received badge ● Popular Question (source) 2016-01-10 12:09:46 -0600 asked a question Some contacts not detected Hello, I use a ModelPlugin to check collisions between my robot and some cubes around. I use the ContactManger of the world attached to the model of the robot. This works most of the time, but I regularly fall in a situation where the robot is stucked on a cube, and the ContactManager doesn't report the contact. The weirdest thing is that, in this situation, if I use the client and click on "view"->"contacts", the ContactManager suddenly see the contact. I tried this enough times to be sure that this is not a coincidence. So, by activating the contacts view in the client, the ContactManger is able to see the contact. Does anyone has an idea where the problem is ? Here is the doc of the ContactManager: http://osrf-distributions.s3.amazonaw... Cheers EDIT (with problem solved) I just put the code here, since I had some boost shared_ptr errors trying to implement the suggested solution. This code here works (no contact detection forgotten anymore). I still think this is an important issue for gazebo. The fact that some contacts are not detected might be the result of some asynchronous functions in ODE for object collision detection and the ContactManager class which is not design to handle this. This is a weird trick to register to a topic to get it working properly. #include "ContactsManager.hh" ContactsManager::ContactsManager() { } ContactsManager::~ContactsManager() { gazebo::transport::fini(); } void ContactsManager::Init(gazebo::physics::ContactManager* contactManager, std::string worldName) { this->contactManager = contactManager; this->isContact = false; // Subscribe to Contact topic this->contactNod = gazebo::transport::NodePtr(new gazebo::transport::Node()); this->contactNod->Init(worldName); this->contactSub = this->contactNod->Subscribe("~/physics/contacts", &ContactsManager::contactsCallBack, this); } bool ContactsManager::checkCollisions() { if(this->isContact == true) { this->isContact = false; return true; } return false; } void ContactsManager::contactsCallBack(ConstWorldStatisticsPtr &_msg) { unsigned int count = this->contactManager->GetContactCount(); std::vector contacts = this->contactManager->GetContacts(); for(unsigned int i=0; i < count; i++) { std::string name1 = contacts[i]->collision1->GetName(); std::string name2 = contacts[i]->collision2->GetName(); // Apply some filters here std::cout << "[contact] " << i << ": " << name1 << " -- " << name2 << std::endl; this->isContact = true; } }  2016-01-06 11:57:05 -0600 answered a question How correctly move joints by SetPosition() ? Hi, I'm not 100% sure, but I think this function might use default PIDs to set joints positions. I think the proper way to do what you want is to use directly these PIDs (or yours): // Get the default PIDs attached to your joints this->jointController = this->model->GetJointController() // In a loop, on your joints // Create a PID gazebo::common::PID PID = gazebo::common::PID(p,i,d,imax,imin,cmdMax,cmdMin); // Set the PID to your joint (pay attention to joint name and scopedName) this->jointController->SetPositionPID((*it)->GetScopedName(),PID); // Set target this->jointController->SetPositionTarget((*it)->GetScopedName(), target); // Update the controller this->jointController->Update();  Here is the doc: https://osrf-distributions.s3.amazona... 2016-01-06 11:38:01 -0600 commented question How do I properly use the gazebo API? Since ODE is the default physic engine for gazebo, you might find some answers here: http://www.ode.org/ 2015-12-11 18:15:30 -0600 received badge ● Notable Question (source) 2015-12-11 07:26:59 -0600 marked best answer CMakeLists for plugin compilation Hello, I don't relly know how to use CMAKE. I would like to add some more .cc files to compile a model or world plugin for gazebo. Until now, I took the CMakLists.txt file given in the tutorial to compile (with commands "cmake ../" and "make"). I added codes to my plugin by including them as .hh file. But the code starts being pretty big and it takes 30 seconds to compile everytime I make a modification. So does anyone knows how I can modify the CMakeListst.txt file to add some other .cc files ? Here is the my actual one:  cmake_minimum_required(VERSION 2.8 FATAL_ERROR) find_package(Boost REQUIRED COMPONENTS system) include_directories(${Boost_INCLUDE_DIRS}) link_directories(${Boost_LIBRARY_DIRS}) include (FindPkgConfig) if (PKG_CONFIG_FOUND) pkg_check_modules(GAZEBO gazebo) endif() include_directories(${GAZEBO_INCLUDE_DIRS}) link_directories(${GAZEBO_LIBRARY_DIRS}) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=gnu++0x") add_library(arm_control SHARED arm_control.cc) target_link_libraries(arm_control${GAZEBO_LIBRARIES} \${Boost_LIBRARIES}) ` Cheers