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

davidem's profile - activity

2023-05-25 03:19:13 -0500 received badge  Famous Question (source)
2022-09-30 02:59:08 -0500 received badge  Popular Question (source)
2022-09-30 02:59:08 -0500 received badge  Notable Question (source)
2021-06-15 08:02:56 -0500 marked best answer param robot_description not found by searchParam()

I am running ROS Melodic and I'm trying to create a launch file to run multiple Turtlebot3 that share a map. I have created a one_robot.launch file that launches a single robot, it looks like this:

<launch>
    <arg name="model" default="$(env TURTLEBOT3_MODEL)" />
    <!-- @ REQUIRED @ -->
    <arg name="robot_name" />
    <arg name="x_pos" />
    <arg name="y_pos" />
    <arg name="z_pos" />

    <param name="robot_description" command="$(find xacro)/xacro '$(find turtlebot3_description)/urdf/turtlebot3_$(arg model).urdf.xacro' prefix:=$(arg multi_robot_name)" />

    <node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher">
      <param name="publish_frequency" type="double" value="50.0" />
      <param name="tf_prefix" value="$(arg multi_robot_name)"/>
    </node>

    <!--spawner-->
    <node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model"
          args="-urdf -model $(arg robot_name) -x $(arg x_pos) -y $(arg y_pos) -z $(arg z_pos)
          -param /$(arg robot_name)/robot_description"
    />

    <!--AMCL -->
    <node pkg="amcl" type="amcl" name="amcl" args="scan:=scan">
        <remap from="static_map" to="/static_map"/>
        <param name="initial_pose_x" value="$(arg x_pos)" />
        <param name="initial_pose_y" value="$(arg y_pos)" />
        <param name="global_frame_id" value="map" />
        <param name="odom_frame_id" value="$(arg robot_name)/odom" />
        <param name="base_frame_id" value="$(arg robot_name)/base_link" />
    </node>
</launch>

I then run two istances of this file in startup.launch, which is:

<launch>
    <arg name="model" default="$(env TURTLEBOT3_MODEL)" />
    <arg name="robot_1" value="robot_1" />
    <arg name="robot_2" value="robot_2" />
    <arg name="gazebo_gui" default="false" /> <!-- ACTIVATE GAZEBO GUI -->

    <!-- GAZEBO -->
    <include file="$(find learning_multirobot)/launch/includes/main_gazebo.launch">
        <arg name="world_name" value="$(find learning_multirobot)/worlds/turtlebot3_house.world"/>
        <arg name="paused" value="false"/>
        <arg name="use_sim_time" value="true"/>
        <arg name="gui" value="$(arg gazebo_gui)"/>
        <arg name="headless" value="false"/>
        <arg name="debug" value="false"/>
    </include>

    <!-- map server -->
    <node pkg="map_server" type="map_server" name="map_loader" args="$(find learning_navigation)/maps/mymap.yaml" />

    <!--robot 1-->
    <group ns="$(arg robot_1)">
        <include file="$(find learning_multirobot)/launch/one_robot.launch">
            <arg name="robot_name" value="$(arg robot_1)" />
            <arg name="x_pos" value="0" />
            <arg name="y_pos" value="0" />
            <arg name="z_pos" value="0" />
        </include>
    </group>

    <!--robot 2-->
    <group ns="$(arg robot_2)">
        <include file="$(find learning_multirobot)/launch/one_robot.launch">
            <arg name="robot_name" value="$(arg robot_2)" />
            <arg name="x_pos" value="-3" />
            <arg name="y_pos" value="1" />
            <arg name="z_pos" value="0" />
        </include>
    </group>

    <!-- RVIZ -->
    <node name="rviz" pkg="rviz" type="rviz" args="-d $(find learning_multirobot)/rviz/complete_config.rviz"/>
</launch>

What happens is that Rviz warns me that RobotModel can't be shown because the parameter robot_description doesn't seem to exist.

I checked if the TF tree was correct, and in fact it is: I won't post it because it would make this question too long, but from the /map root frame there are two tfs to robot_1/odom and robot_2/odom, which are then connected to their respective base_link and all the ... (more)

2021-04-19 08:20:31 -0500 received badge  Famous Question (source)
2021-04-05 16:36:11 -0500 received badge  Famous Question (source)
2021-03-12 06:16:59 -0500 received badge  Famous Question (source)
2021-02-22 04:30:21 -0500 received badge  Nice Question (source)
2020-11-17 22:47:08 -0500 received badge  Famous Question (source)
2020-10-28 19:03:44 -0500 received badge  Notable Question (source)
2020-10-23 05:13:38 -0500 received badge  Notable Question (source)
2020-10-13 03:58:27 -0500 received badge  Famous Question (source)
2020-09-08 20:02:25 -0500 received badge  Popular Question (source)
2020-09-08 20:02:25 -0500 received badge  Notable Question (source)
2020-08-22 07:22:21 -0500 received badge  Famous Question (source)
2020-08-06 12:05:04 -0500 received badge  Famous Question (source)
2020-07-30 02:26:26 -0500 received badge  Famous Question (source)
2020-07-28 03:59:55 -0500 received badge  Famous Question (source)
2020-05-21 05:12:55 -0500 received badge  Famous Question (source)
2020-05-12 13:47:32 -0500 received badge  Notable Question (source)
2020-05-12 09:02:56 -0500 received badge  Popular Question (source)
2020-05-12 09:02:56 -0500 received badge  Notable Question (source)
2020-05-12 05:14:14 -0500 received badge  Famous Question (source)
2020-05-04 10:40:23 -0500 received badge  Famous Question (source)
2020-04-29 07:28:43 -0500 received badge  Notable Question (source)
2020-04-14 02:08:21 -0500 received badge  Famous Question (source)
2020-04-03 03:11:33 -0500 received badge  Notable Question (source)
2020-02-13 10:03:20 -0500 received badge  Notable Question (source)
2020-02-05 07:46:52 -0500 received badge  Notable Question (source)
2020-01-31 01:00:53 -0500 received badge  Notable Question (source)
2020-01-27 04:20:44 -0500 edited question roslaunch pass args from a python script

roslaunch pass args from a python script I have a multirobot navigation and I've defined a main.launch file where I incl

2020-01-26 06:54:05 -0500 received badge  Popular Question (source)
2020-01-26 04:09:51 -0500 edited question roslaunch pass args from a python script

roslaunch pass args from a python script I have a multirobot navigation and I've defined a main.launch file where I incl

2020-01-25 12:30:45 -0500 edited question roslaunch pass args from a python script

roslaunch pass args from a python script I have a multirobot navigation and I've defined a main.launch file where I incl

2020-01-25 12:30:15 -0500 asked a question roslaunch pass args from a python script

roslaunch pass args from a python script I have a multirobot navigation and I've defined a main.launch file where I incl

2020-01-20 03:00:38 -0500 received badge  Popular Question (source)
2020-01-15 08:13:09 -0500 marked best answer get all the active namespaces rospy | roscpp

In my project, multiple robots may be spawned both at launch and at runtime, each under a certain namespace. Generally, that is 'robot_ID' where ID == a robot-unique integer, but nothing stops the user from selecting its own namespace.

I need to programmaticaly retrieve a list of namespaces currently active from a node that is in the global namespace. That must be like that.
When I launch my project, on std rosout this gets printed:

NODES
  /robot_2/               # <- NAMESPACE
    amcl (amcl/amcl)
    move_base (move_base/move_base)
    robot_state_publisher (robot_state_publisher/robot_state_publisher)
    spawn_urdf (gazebo_ros/spawn_model)
  /robot_1/              # <- NAMESPACE
    amcl (amcl/amcl)
    move_base (move_base/move_base)
    robot_state_publisher (robot_state_publisher/robot_state_publisher)
    spawn_urdf (gazebo_ros/spawn_model)
  /                     # <- STANDARD NAMESPACE
    gazebo (gazebo_ros/gzserver)
    map_loader (map_server/map_server)
    rviz (rviz/rviz)

So this leads me into thinking that there is a way to do so. I'm mostly using Python, but for this purpose only I would also be willing to use a C++ node.

EDIT: I've marked what I would like to retrieve from the above piece of output.

2020-01-13 06:58:40 -0500 commented question Voronoi map segmentation package

I have edited my question

2020-01-13 05:13:49 -0500 edited question Voronoi map segmentation package

Voronoi map segmentation package I am looking for a package that, given a map of the environment acquired via gmapping,

2020-01-13 05:06:37 -0500 asked a question Voronoi map segmentation package

Voronoi map segmentation package I am looking for a package that, given a map of the environment acquired via gmapping,

2020-01-13 03:44:49 -0500 marked best answer ROS time starts at 90

I am working with ROS Melodic on Ubuntu 18.04, using Gazebo as virtualizer and a Turtlebot.
So far, with every simulation I ran, I used the so-called turtlebot_house.world that came with installing the ROBOTIS Turtlebot3 simulations package.
When I use that world, ROS time correctely starts at 0.00 secs.
Recently, I defined my own world using the Gazebo world editor tool as described in this video. When I launch a simulation in my world, ROS time starts at approx 90.00 secs: I can see this in the stdout shell and also getting the time inside my scripts.

I have no clue in what's wrong nor what to do to provide further details. The same issue also happens across PCs.

2020-01-13 03:44:36 -0500 answered a question ROS time starts at 90

Found the solution myself: gotta say it's definetly awkward, but for some reason my exported world had these four parame

2020-01-13 03:44:36 -0500 received badge  Rapid Responder (source)
2020-01-13 03:34:01 -0500 asked a question ROS time starts at 90

ROS time starts at 90 I am working with ROS Melodic on Ubuntu 18.04, using Gazebo as virtualizer and a Turtlebot. So fa

2020-01-07 01:23:23 -0500 received badge  Popular Question (source)
2020-01-04 02:40:28 -0500 received badge  Popular Question (source)
2019-12-29 15:29:02 -0500 received badge  Notable Question (source)
2019-12-27 07:59:07 -0500 received badge  Popular Question (source)
2019-12-26 12:45:06 -0500 edited question process same callback from topics under different namespaces

process same callback from topics under different namespaces I'm not sure wether the title is correct for my issue, any

2019-12-26 12:34:43 -0500 edited question process same callback from topics under different namespaces

process same callback from topics under different namespaces I'm not sure wether the title is correct for my issue, any