ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

unable to compile default_robot_hw_sim.cpp

asked 2014-06-22 23:01:11 -0500

rnunziata gravatar image

updated 2014-06-22 23:02:18 -0500

I have been trying to compile default_robot_hw_sim.cpp on Indigo under Ubuntu 14. I do not see any issue tracking this so I believe there is an issue with my environment. Can someone give me an idea where to look for resolution. I was able to compile in Hydro under Ubuntu 13.

default_robot_hw_sim.dir/src/default_robot_hw_sim.cpp.o
Built target gazebo_ros_control
/home/richard/catkin_ws/src/gazebo_ros_pkgs/gazebo_ros_control/src/default_robot_hw_sim.cpp: In member function ‘virtual bool gazebo_ros_control::DefaultRobotHWSim::initSim(const string&, ros::NodeHandle, gazebo::physics::ModelPtr, const urdf::Model*, std::vector<transmission_interface::TransmissionInfo>)’:
/home/richard/catkin_ws/src/gazebo_ros_pkgs/gazebo_ros_control/src/default_robot_hw_sim.cpp:155:78: error: ‘struct transmission_interface::ActuatorInfo’ has no member named ‘hardware_interface_’
       const std::string& hardware_interface = transmissions[j].actuators_[0].hardware_interface_;
                                                                              ^
make[2]: *** [gazebo_ros_pkgs/gazebo_ros_control/CMakeFiles/default_robot_hw_sim.dir/src/default_robot_hw_sim.cpp.o] Error 1
make[1]: *** [gazebo_ros_pkgs/gazebo_ros_control/CMakeFiles/default_robot_hw_sim.dir/all] Error 2
make: *** [all] Error 2
Invoking "make" failed
edit retag flag offensive close merge delete

Comments

The problem seems to be in trasmission_info.h where the member hardware_interfaces_ in the struct ActuatorInfo has been changed from (in Hydro): std::string> hardware_interface_; to (in Indigo): std::vector<std::string> hardware_interfaces_; but the change was not receipt in default_robot_hw_sim.cpp Enrico

Enrico Villagrossi gravatar image Enrico Villagrossi  ( 2014-07-04 02:19:17 -0500 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2014-07-04 02:47:26 -0500

Adolfo Rodriguez T gravatar image

From the looks of it, you are using hydro's ros_control, but are building gazebo_ros_control from source using the indigo-devel branch.

If you are working in hydro, but need ros_control features that are only released into indigo, you should be able to build the indigo-devel versions of ros_control and gazebo_ros_control in an otherwise Hydro environment. Otherwise just stick to hydro-only code.

edit flag offensive delete link more

Comments

You are right. My ROS packages were aligned with Indigo while my gazebo_ros_control was at the Hydro version. The problem was with the git clone where I didn't specified the right branch of the libraries for indigo-devel... Thank you! Enrico

Enrico Villagrossi gravatar image Enrico Villagrossi  ( 2014-07-04 04:27:08 -0500 )edit

So r u saying that clone does not work how do I get the right packages Indigo-devel. I am working only in Indigo I have no hydro that I know of. All downloading was done via ubuntu software center. Please tell me the in detail how to resolve. I was using git clone to get the source for gazebo_ros_pkgs.

rnunziata gravatar image rnunziata  ( 2014-07-04 17:44:17 -0500 )edit

For the package gazebo_ros_pkgs you have to specify the right branch to the git clone for indigo-devel: git clone -b indigo-devel https://github.com/ros-simulation/gazebo_ros_pkgs.git othewise you will clone the hydro-devel...

Enrico Villagrossi gravatar image Enrico Villagrossi  ( 2014-07-05 03:06:54 -0500 )edit

Thanks....I am able to compile now. I had to compile it several times for some reason could not get it to compile in none shot.

rnunziata gravatar image rnunziata  ( 2014-07-06 15:44:58 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2014-06-22 23:01:11 -0500

Seen: 465 times

Last updated: Jul 04 '14