Controller_manager in a different namespace

asked 2022-12-12 17:21:21 -0500

lectric gravatar image

I am using Ros Noetic in Ubuntu 20.02 and i am trying to move joints using rostopic to simulate a rover. I have created a simple robot with only one join and when i try to load the controller, it doesn't work. I've followed the tutorial of gazebo ros control but it doesnt work as well. My files are the following: .xacro: <robot <a="" href="http://xmlns:xacro="http://www.ros.org/wiki/xacro%22" name="srob">xmlns:xacro="http://www.ros.org/wiki/...></robot>

<xacro:include filename="$(find srob_description)/urdf/materials.xacro"/> <xacro:include filename="$(find srob_description)/urdf/srob.trans"/> <xacro:include filename="$(find srob_description)/urdf/srob.gazebo"/> <link name="base_link"> <inertial> <origin xyz="0.0 0.0 0.045" rpy="0 0 0"/> <mass value="1.387209506100743"/> <inertia ixx="0.001153" iyy="0.001153" izz="0.000434" ixy="0.0" iyz="0.0" ixz="0.0"/> </inertial> <visual> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <mesh filename="package://srob_description/meshes/base_link.stl" scale="0.001 0.001 0.001"/> </geometry> <material name="silver"/> </visual> <collision> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <mesh filename="package://srob_description/meshes/base_link.stl" scale="0.001 0.001 0.001"/> </geometry> </collision> </link>

<link name="sup_body_1"> <inertial> <origin xyz="-1.7319474058923284e-18 0.0059742930634413376 0.0277703328891217" rpy="0 0 0"/> <mass value="0.3220513773536345"/> <inertia ixx="0.000173" iyy="9e-05" izz="0.000115" ixy="-0.0" iyz="-3.3e-05" ixz="-0.0"/> </inertial> <visual> <origin xyz="-0.0 -0.0 -0.09" rpy="0 0 0"/> <geometry> <mesh filename="package://srob_description/meshes/sup_body_1_1.stl" scale="0.001 0.001 0.001"/> </geometry> <material name="silver"/> </visual> <collision> <origin xyz="-0.0 -0.0 -0.09" rpy="0 0 0"/> <geometry> <mesh filename="package://srob_description/meshes/sup_body_1_1.stl" scale="0.001 0.001 0.001"/> </geometry> </collision> </link>

<joint name="Rev" type="continuous"> <origin xyz="0.0 0.0 0.09" rpy="0 0 0"/> <parent link="base_link"/> <child link="sup_body_1"/> <axis xyz="0.0 0.0 1.0"/> </joint>

</robot> .gazebo:

<robot <a="" href="http://xmlns:xacro="http://www.ros.org/wiki/xacro" name="srob">xmlns:xacro="http://www.ros.org/wiki/..." ><="" p=""> </robot>

<xacro:property name="body_color" value="Gazebo/Silver"/>

<gazebo> <plugin name="control" filename="libgazebo_ros_control.so"/> <robotnamespace>/srob</robotnamespace> </gazebo> <gazebo reference="base_link"> <material>${body_color}</material> <mu1>0.2</mu1> <mu2>0.2</mu2> <selfcollide>true</selfcollide> <gravity>true</gravity> </gazebo>

<gazebo reference="sup_body_1"> <material>${body_color}</material> <mu1>0.2</mu1> <mu2>0.2</mu2> <selfcollide>true</selfcollide> </gazebo>

</robot>

gazebo.launch: <launch> <node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-param robot_description -urdf -model srob"/> <include file="$(find gazebo_ros)/launch/empty_world.launch"> ... (more)

edit retag flag offensive close merge delete