From: Walter Fetter Lages Date: Sun, 18 Nov 2018 07:26:12 +0000 (-0200) Subject: Fix namespace bug. X-Git-Url: http://git.ece.ufrgs.br/?a=commitdiff_plain;h=e4d17169b04337ba76d3a5c891a7dd618e198814;p=gazebo_ros_electrical.git Fix namespace bug. --- diff --git a/src/dcmotor_robot_hw_sim.cpp b/src/dcmotor_robot_hw_sim.cpp index e5ea0b6..02fb28a 100644 --- a/src/dcmotor_robot_hw_sim.cpp +++ b/src/dcmotor_robot_hw_sim.cpp @@ -274,7 +274,7 @@ bool DCmotorRobotHWSim::initSim( } if (joint_control_methods_[j] == VOLTAGE) { - const ros::NodeHandle nh(model_nh,"/gazebo_ros_electrical/dcmotor/"+joint_names_[j]); + const ros::NodeHandle nh(robot_namespace + "/gazebo_ros_electrical/dcmotor/"+joint_names_[j]); if (!nh.getParam("Ra",joint_resistance_[j])) { ROS_ERROR("No Ra specified for D.C motor. Namespace: %s", nh.getNamespace().c_str());