0
$\begingroup$

Rosanswers logo

I'm having problems getting my model to work in gazebo: when I spawn my model in gazebo, I get a segfault. I'm almost sure it's due to my custom transmissions, because the model is working when the standard pr2 simple_transmission are used.

The backtrace is available here.

My model contains custom transmissions (which are almost copies of the simple_transmission.cpp, as you can see here.

I uploaded the generated model here.

Those transmissions are working on the real robot, but not in Gazebo.

Any ideas?


Originally posted by Ugo on ROS Answers with karma: 1620 on 2011-09-15

Post score: 1


Original comments

Comment by Ugo on 2011-10-24:
The root of the problem is that the pr2_gazebo_plugins/src/gazebo_ros_controller_manager.cpp instantiates a ''''pr2_hardware_interface::Actuator" object (line 470), and not my custom actuator (which inherits from the pr2 Actuator class). Is it not possible to have a custom actuator?

Comment by Ugo on 2011-09-15:
If I comment out the call to publishMechanismStatistics() in the ControllerManager::update() function then the simulation seems to be working fine.

Comment by Ugo on 2011-09-15:
It appears the problem is coming from the iteration on the actuator map in ControllerManager::publishMechanismStatistics(): the for (ActuatorMap::const_iterator it = model_.hw_->actuators_.begin(); it != model_.hw_->actuators_.end(); ++i, ++it) returns a segfault on the 3rd element.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Ok, I solved it by creating my own implementation of the pr2_gazebo_plugins/src/gazebo_ros_controller_manager.cpp.

This is available in the sr_gazebo_plugins package.


Originally posted by Ugo with karma: 1620 on 2011-10-25

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.