ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
2022-06-26 11:41:25 -0500 | received badge | ● Nice Question (source) |
2020-05-11 10:55:45 -0500 | received badge | ● Favorite Question (source) |
2020-03-11 03:34:18 -0500 | received badge | ● Favorite Question (source) |
2018-01-25 18:00:50 -0500 | marked best answer | Problems to move the wheels with a PID controller Hi guys! I got a robot simulated in Gazebo which i'd like to control easily. I made 3 controllers (thanks to the tutorials) : one to control the head and a controller for each wheel. I should mention that the robot stands on a 3rd wheel (it's just a ball actually), it might cause a problem but if so, I don't know which one. By setting the effort applied on the wheel joints, it works "ok". It's not perfect (zigzags and slidings) but if the applied effort is not to high, it's ok. So, I tried to add a PID to these controllers. The head controller works just fine with it. But when I did the same with the left wheel, I got some very strange results : the robot starts jumping/flying before landing far away when the wheel comes to the position I asked. I first thought to change the PID parameters, but the problem remains : the effort applied by the I also tried changing the weight of the wheels and the body in the URDF file , and I set the contact coefficient using the following code : ("lefttire" is the name of the link) ...vainly Should I add a PID controller for the wheel speed? Or should I look at this 3rd wheel? Any help appreciated! Thanks! UPDATE : "Please, help!" |
2016-10-19 16:25:56 -0500 | received badge | ● Good Answer (source) |
2015-04-13 22:50:18 -0500 | marked best answer | Controlling joints in Gazebo Hi everyone I am new to ROS and Gazebo and I got problems into using the joint_state_publisher package. I have a robot with multiple non-fixed joints. I created 2 launch files : one to display the robot in rviz, the other to display in Gazebo. RVIZ : Gazebo: By setting the "gui" argument to "true", I can control the joints on rviz via the joint_state_publisher, but this doesn't work on Gazebo. Using rxgraph, I see something like that : /joint_state_publisher---> /robot_state_publisher ---> /rviz ---> /rosout /gazebo ---> /joint_state_publisher---> /robot_state_publisher ---> /rosout Actually, /gazebo publishes a /clock topic to both joint_state_publisher and robot_state_publisher, whereas /rviz subscribes to the /tf topic (as expected). Does anyone know if gazebo can be set as a /tf subscriber? Or any other solution to control the robot in gazebo? Would the pr2_mechanism stack be adapted? Sorry about the beginner question and the poor english. thanks! |
2013-11-13 09:55:25 -0500 | received badge | ● Nice Answer (source) |
2013-10-08 17:15:30 -0500 | received badge | ● Famous Question (source) |
2013-02-01 03:19:44 -0500 | received badge | ● Notable Question (source) |
2012-11-13 03:53:40 -0500 | commented answer | How to make a realtime controller get information Or you may create your own gazebo plugin if you need to. |
2012-11-13 03:28:00 -0500 | commented answer | How to make a realtime controller get information I would recommend a more "high level" solution, such as the pr2_controller_manager if needed, or at list a non-realtime controller node that might apply forces in a right way, but i guess it is what you wanna do with your arduino board. |
2012-11-13 03:25:03 -0500 | commented answer | How to make a realtime controller get information did you take a look at Gazebo wiki? There is the list of all services, topics and most plugins available with gazebo in ros, especially the /apply_joint_effort service. But as far as I know, you can not apply speed or position directly in gazebo (except in gazebo gui) since its a physics simulator |
2012-11-13 03:02:05 -0500 | commented answer | How to make a realtime controller get information I dont understand what you exactly want to do, just know that I use gazebo and I've never used ROS on Arduino so I'll probably wont be very useful to u. So what is your question exactly? Maybe u should try this tutorial : http://www.ros.org/wiki/ROS/Tutorials/WritingPublisherSubscriber%28c%2B%2B%29 |
2012-11-07 21:08:41 -0500 | commented question | pr2: writing a realtime joint controller I see nothing wrong in EDIT 4 after quick overview, although I wonder why there are so many other controllers running... Did you print out the effort applied on the joint? It might be useful to see what is going on in the code itself. |
2012-11-07 02:25:38 -0500 | answered a question | How to make a realtime controller get information I tried everything and it seems that the only way is to advertise a service. It seems a realtime controller can neither subscribe to a topic nor send a request to another service. It can publish a topic thanks to the realtime_tools package though. For instance : to get information from gazebo, I made an intermediate node that subscribes to topics published by gazebo and sends service requests to the controller. That's the only I found. |
2012-11-07 02:16:56 -0500 | commented answer | pr2: writing a realtime joint controller Thx Lorenz. I updated it again since both code lines where not coherent. My advice to ccm was to use a different name for the controller and the plugin to declare it right, especially in that line from the tutorial : PLUGINLIB_DECLARE_CLASS(my_controller_pkg, ..., ...). Check files Lorenz told u to |
2012-11-07 02:05:16 -0500 | edited answer | pr2: writing a realtime joint controller Hi The warning tells you to declare "my_controller_pkg/MyControllerPlugin" instead of "MyControllerPlugin" when you set your parameters to the parameter server. So the good command is : I don't know what the problem is in Gazebo, but there might be a conflict due to your controller name. As it is said in the tutorial, if you use a yaml file, it should look like this : You may try another controller name. Hope that helps. |
2012-11-05 23:05:50 -0500 | received badge | ● Nice Answer (source) |
2012-11-02 00:33:26 -0500 | commented question | pr2: writing a realtime joint controller Do you see your controller plugin when you type '$ rosrun pr2_controller_manager pr2_controller_manager list-types' now? Again, be careful not to use the same name for your controller and your plugin |
2012-10-31 04:45:26 -0500 | received badge | ● Famous Question (source) |
2012-10-29 00:37:30 -0500 | commented question | pr2: writing a realtime joint controller Are you sure your controller is running? |
2012-10-16 02:20:47 -0500 | answered a question | Problems to move the wheels with a PID controller Interesting answer to read here too: http://answers.ros.org/question/43327/controller-makes-robot-unstable-in-gazebo/ |
2012-10-15 18:42:53 -0500 | received badge | ● Popular Question (source) |
2012-10-15 17:11:04 -0500 | received badge | ● Notable Question (source) |
2012-10-15 04:52:56 -0500 | edited answer | publisher and subscriber in single node You should not declare your publiser in your callback function : this callback function is called only when data is received on topic 'a', that is why topic 'c' depends on topic 'a'. Store the data you got from topic 'a' into a "global" variable and declare your published topic 'c' into the main. For example : Update : To your question "how to access data from a topic" (see comments) For example, if you want to access the x position of your robot spawned in gazebo empty world. You can get that information from the topic /model_state that you can get in gazebo your callback function would look like this : Look at the links above. If you need better understanding, launch a robot in gazebo and run the following |
2012-10-15 02:46:25 -0500 | marked best answer | pr2_controller_interface inheritance Hi everyone! Using a differential wheeled robot, I'm trying to clean up my controller programs : I used a controller for each wheel in two different package, whereas they are very very similar ! But now, the left wheel controller inherits from the WheelController class, which inherits from the pr2_controller_interface::Controller class (as in the tutorials). I built the library for the left wheel controller, and specified the base class was the WheelController class (with PLUGINLIB_DECLARE_CLASS and in the controller_plugins.xml file). I got the following when i try to load the controller after running my robot in gazebo :
Is the problem that my controller does not directly inherit from the pr2_controller_interface::Controller class? I tried specifying that class instead of the WheelController class, but it still fails. Any idea? UP ! (again) |
2012-10-15 02:43:45 -0500 | received badge | ● Commentator |
2012-10-15 02:43:45 -0500 | commented answer | pr2_controller_interface inheritance I did, but I didnt know what to declare as "base_class" : it should be my WheelController class that inherits from pr2_controller_interface, but it caused errors, so I declared pr2_controller_interface as base class, neither did it work. I'm gonna go with only 1 controler plugin as you said, thanks! |
2012-10-15 00:02:52 -0500 | edited question | How to make a realtime controller get information Hi guys So I have a robot simulated in Gazebo that I can control with the realtime controllers I made thanks to the tutorials. I also added a service and a PID controller as in the tutorials (which doesnt work good for every controller, but that's another topic!). Since I want to have a "smart navigation" with the robot, I tried getting information from the ros topic published by gazebo : ModelStates. It gives you position, orientation, velocity... So I made my controller subscribe to that topic the following way (no need to give the whole code). So the callback output gives me the position of the robot (as it is supposed to do), but the update function loop give me "-0.0". I just guess that such subscription can not be done in real time...? In a way or another, I'd like to get navigation information. I looked at a few things :
Any answer to these questions, or any suggestion is very welcome! Update : I may build a non real time controller, but in this case (if RT is a dead-end), what tools should I use? pr2_controller_manager or pr2_mechanism_model are realtime specific, and a solution involving topics subscribed by gazebo might be a bit low-level. UP |