Ask Your Question
1

can not add a name space to spawn node

asked 2014-09-23 09:37:25 -0600

RSA_kustar gravatar image

updated 2017-12-03 17:05:45 -0600

jayess gravatar image

I have the following launch file:

<?xml version="1.0"?>

<launch>
    <!--<include file="$(find husky_gazebo)/launch/base.urdf.gazebo.launch"/>-->
     <param name="use_sim_time" value="true" />

    <!-- Send the Husky A200 Robot URDF/XACRO to param server -->
    <param name="robot_description" command="$(find xacro)/xacro.py '$(find husky_description)/urdf/base.urdf.xacro'" />

    <!-- Spawn robot in gazebo -->
    <node name="spawn_husky_model" pkg="gazebo_ros"  type="spawn_model" args="$(optenv ROBOT_INITIAL_POSE) -unpause -urdf -param robot_description -model mobile_base />

    <node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" ns="husky_ns">
        <param name="publish_frequency" type="double" value="50.0" />
    </node>




    <include file="$(find gazebo_ros)/launch/empty_world.launch"/>
    <node pkg="robot_pose_ekf" type="robot_pose_ekf" name="robot_pose_ekf" ns="husky_ns" >
      <rosparam>
        freq: 10.0
        sensor_timeout: 1.0
        publish_tf: true
        odom_used: true
        vo_used: true
        output_frame: odom
      </rosparam>
    </node>
</launch>

I want to add a name space to this node but I cant

 <!-- Spawn robot in gazebo -->
    <node name="spawn_husky_model" pkg="gazebo_ros"  type="spawn_model" args="$(optenv ROBOT_INITIAL_POSE) -unpause -urdf -param robot_description -model mobile_base ns="husky_ns" />

Why I cant add ? and how can I add a name space for this node ?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2014-09-24 00:53:51 -0600

RSA_kustar gravatar image

updated 2017-12-03 17:05:07 -0600

jayess gravatar image

I solve it. For pkg = gazebo in the argument we add -gazebo_namespace while in pkg=gazebo_ros we write -robot_namespace as follows:

<node name="spawn_husky_model" pkg="gazebo_ros"  type="spawn_model" args="$(optenv ROBOT_INITIAL_POSE) -unpause -urdf -param robot_description -model mobile_base -robot_namespace husky_ns " />
edit flag offensive delete link more
0

answered 2014-09-23 11:05:00 -0600

Chrissi gravatar image

Could it be that there is just a " missing after mobile_base?

<!-- Spawn robot in gazebo -->
<node name="spawn_husky_model" pkg="gazebo_ros"  type="spawn_model" args="$(optenv ROBOT_INITIAL_POSE) -unpause -urdf -param robot_description -model mobile_base" ns="husky_ns" />
edit flag offensive delete link more

Comments

no, I actually solve it. I will add the answer now

RSA_kustar gravatar imageRSA_kustar ( 2014-09-24 00:53:27 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-09-23 09:37:25 -0600

Seen: 723 times

Last updated: Dec 03 '17