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

pgigioli's profile - activity

2021-07-25 01:46:17 -0500 marked best answer Using ROS commands over ssh?

I am trying to launch a node using a launch file on a remote computer from a local machine but I am getting the error: "error launching on [192.168.1.7-0, uri http://ai2:37824/ ]: Name or service not known." I have the ROS_MASTER_URI set to the local machine (the machine attempting to launch the file). I also noticed that when I try ssh'ing into the remote computer and running a ROS command on the same line, it does not work.

For example:

ssh ai2@192.168.1.7 
rostopic list // works

ssh ai2@192.168.1.7 ls // works

ssh ai2@192.168.1.7 rostopic list // does not work

It seems that something about ssh'ing and executing a ROS command on the same line does not work and I think this problem is related to the problem I am having with the launch file. Has anyone ever dealt with this issue?

2020-08-13 08:20:31 -0500 marked best answer Scan matching failed, using odometry

Whenever I'm trying to navigate while using gmapping with my turtlebot2, I get the error "scan matching failed, using odometry" and as a result my local and global costmaps do not get published. In fact, the map and odom topics never get published to the move_base local and global costmaps and as a result the robot relies on odometry for navigation which is really inaccurate.

Thinking this was a problem with my parameters, I tried gmapping on gazebo on a separate pc and got the same error. Still convinced that I messed with the parameters somehow, I completely reinstalled ros and tried the gazebo gmapping tutorial found here but got the same error.

Is anyone else experiencing this issue? On my rqt_graph when using gazebo gmapping, the move_base node doesn't show up at all.

2019-07-11 03:32:46 -0500 marked best answer catkin_make error when compiling cuda code on TK1

I am trying to compile a package that has C++, C, and Cuda code. I've been able to successfully compile the package on a TX1 with cuda 7.0 but I get a strange compilation error when compiling on my TK1 with cuda 6.5. Here is the error:

ubuntu@tegra-ubuntu:~/catkin_ws$ catkin_make
Base path: /home/ubuntu/catkin_ws
Source space: /home/ubuntu/catkin_ws/src
Build space: /home/ubuntu/catkin_ws/build
Devel space: /home/ubuntu/catkin_ws/devel
Install space: /home/ubuntu/catkin_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/ubuntu/catkin_ws/build"
####
####
#### Running command: "make -j1 -l1" in "/home/ubuntu/catkin_ws/build"
####
[  0%] Building NVCC (Device) object darknet_ros/CMakeFiles/ROS_interface.dir/src/./ROS_interface_generated_yolo_kernels.cu.o
-- Removing /home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/./ROS_interface_generated_yolo_kernels.cu.o
/usr/bin/cmake -E remove /home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/./ROS_interface_generated_yolo_kernels.cu.o
-- Generating dependency file: /home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/ROS_interface_generated_yolo_kernels.cu.o.NVCC-depend
/usr/local/cuda-6.5/bin/nvcc -M -D__CUDACC__ /home/ubuntu/catkin_ws/src/darknet_ros/src/yolo_kernels.cu -o /home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/ROS_interface_generated_yolo_kernels.cu.o.NVCC-depend -ccbin /usr/bin/cc -m32 -DROS_BUILD_SHARED_LIBS=1 -DROS_PACKAGE_NAME=\"darknet_ros\" -DROSCONSOLE_BACKEND_LOG4CXX -DGPU -DOPENCV -Xcompiler ,\"-g\" -arch=sm_32 -O3 -gencode arch=compute_20,code=sm_20 -DNVCC -I/usr/local/cuda-6.5/include -I/home/ubuntu/catkin_ws/devel/include -I/usr/include/opencv -I/usr/include -I/usr/local/cuda/include -I/home/ubuntu/catkin_ws/src/darknet_ros/src -I/opt/ros/indigo/include -I/usr/local/cuda-6.5/include
-- Generating temporary cmake readable file: /home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/ROS_interface_generated_yolo_kernels.cu.o.depend.tmp
/usr/bin/cmake -D input_file:FILEPATH=/home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/ROS_interface_generated_yolo_kernels.cu.o.NVCC-depend -D output_file:FILEPATH=/home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/ROS_interface_generated_yolo_kernels.cu.o.depend.tmp -P /usr/share/cmake-2.8/Modules/FindCUDA/make2cmake.cmake
-- Copy if different /home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/ROS_interface_generated_yolo_kernels.cu.o.depend.tmp to /home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/ROS_interface_generated_yolo_kernels.cu.o.depend
/usr/bin/cmake -E copy_if_different /home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/ROS_interface_generated_yolo_kernels.cu.o.depend.tmp /home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/ROS_interface_generated_yolo_kernels.cu.o.depend
-- Removing /home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/ROS_interface_generated_yolo_kernels.cu.o.depend.tmp and /home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/ROS_interface_generated_yolo_kernels.cu.o.NVCC-depend
/usr/bin/cmake -E remove /home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/ROS_interface_generated_yolo_kernels.cu.o.depend.tmp /home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/ROS_interface_generated_yolo_kernels.cu.o.NVCC-depend
-- Generating /home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/./ROS_interface_generated_yolo_kernels.cu.o
/usr/local/cuda-6.5/bin/nvcc /home/ubuntu/catkin_ws/src/darknet_ros/src/yolo_kernels.cu -c -o /home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/./ROS_interface_generated_yolo_kernels.cu.o -ccbin /usr/bin/cc -m32 -DROS_BUILD_SHARED_LIBS=1 -DROS_PACKAGE_NAME=\"darknet_ros\" -DROSCONSOLE_BACKEND_LOG4CXX -DGPU -DOPENCV -Xcompiler ,\"-g\" -arch ...
(more)
2019-05-20 02:27:21 -0500 marked best answer Map not received when using nav2d with gazebo

I'm trying to use nav2d to autonomously map out an environment in gazebo but I am unable to get the gmapping nav2d node "mapper" to publish a /map msg. First I launch the turtlebot_gazebo/turtlebot_world.launch to start the turtlebot in gazebo and then I launch a modified version of the nav2d tutorial3.launch file.

In RVIZ, I get an error message under the map section that says "no map received" and "No transform [] to [map]. The output of rostopic echo /map is "WARNING: no messages received and simulated time is active.Is /clock being published?" I checked /clock and it is publishing so that is not the issue.

Also, when I run turtlebot_gazebo/gmapping_demo instead of nav2d, a /map msg is published correctly so I don't think its an issue with my gazebo configuration. My guess is that the nav2d "mapper" node is connected to the wrong laser frame but I have tried changing the base frame from base_laser_link to base_laser and to camera_depth_frame and neither worked.

Rqt_graph shows a /scan msg being published to mapper and a /map msg being published to RVIZ.

Below are my launch file and ros.yaml file which defines the parameters for nav2d.

Here is my current launch file:

 <launch>

    <!-- Some general parameters -->
    <param name="use_sim_time" value="true" />
    <rosparam file="$(find nav2d_tutorials)/param/ros.yaml"/>

    <!-- Start Stage simulator with a given environment -->
    <!--<node name="Stage" pkg="stage_ros" type="stageros" args="$(find nav2d_t$
            <param name="base_watchdog_timeout" value="0" />
    </node>
 -->
    <!-- Start the Operator to control the simulated robot -->
    <node name="Operator" pkg="nav2d_operator" type="operator" >
    <!--    <remap from="scan" to="base_scan"/> -->
            <remap from="cmd_vel" to="cmd_vel_mux/input/teleop" />
            <rosparam file="$(find nav2d_tutorials)/param/operator.yaml"/>
            <rosparam file="$(find nav2d_tutorials)/param/costmap.yaml" ns="loc$
    </node>

    <!-- Start Mapper to genreate map from laser scans -->
    <node name="Mapper" pkg="nav2d_karto" type="mapper">
                <!--<remap from="scan" to="base_scan"/>-->
            <rosparam file="$(find nav2d_tutorials)/param/mapper.yaml"/>
    </node>

    <!-- Start the Navigator to move the robot autonomously -->
    <node name="Navigator" pkg="nav2d_navigator" type="navigator">
            <rosparam file="$(find nav2d_tutorials)/param/navigator.yaml"/>
    </node>

    <node name="GetMap" pkg="nav2d_navigator" type="get_map_client" />
    <node name="Explore" pkg="nav2d_navigator" type="explore_client" />
    <node name="SetGoal" pkg="nav2d_navigator" type="set_goal_client" />
  <!-- Start the joystick-driver and remote-controller for operation-->
  <!--    <node name="Joystick" pkg="joy" type="joy_node" />
    <node name="Remote" pkg="nav2d_remote" type="remote_joy" />
   -->
    <!-- Pioneer model for fancy visualization -->
    <!-- Comment this out if you do not have the package 'p2os' available! -->
   <!--    <include file="$(find p2os_urdf)/launch/pioneer3at_urdf.launch" />
    <node name="front_left_wheel" pkg="tf" type="static_transform_publisher" ar$
    <node name="front_right_wheel" pkg="tf" type="static_transform_publisher" a$
    <node name="back_left_wheel" pkg="tf" type="static_transform_publisher" arg$
    <node name="back_right_wheel" pkg="tf" type="static_transform_publisher" ar$
  -->
    <!-- RVIZ to view the visualization -->
    <node name="RVIZ" pkg="rviz" type="rviz" args=" -d $(find nav2d_tutorials)/$

   </launch>

ros.yaml file:

   ###########################################################
   # Defines topics services and frames for all modules

   ### TF frames #############################################
   laser_frame: base_laser_link
   robot_frame: base_link
   odometry_frame: odom
   offset_frame: offset
   map_frame: map

   ### ROS topics ############################################
   map_topic: map
   laser_topic: scan ## ORIG = base_scan

   ### ROS services ##########################################
   map_service: static_map
2019-02-28 19:58:36 -0500 received badge  Good Question (source)
2018-07-06 07:18:20 -0500 marked best answer What is a nodelet?

Can anyone explain conceptually what a nodelet is and what the motivation is for using one? The documentation says that nodelets are "designed to provide a way to run multiple algorithms in the same process with zero copy transport between algorithms" but I don't understand what this really means.

Are nodelets just a way of making your nodes more efficient?

Thanks!

2018-06-04 08:59:00 -0500 marked best answer How to use <param> in launch files to change variable values in node scripts?

I'm trying to use in launch files to change variable values in node scripts but it doesn't seem to work.

Here is my launch file:

<launch>

  <include file="$(find turtlebot_bringup)/launch/minimal.launch" />

  <include file="$(find turtlebot_navigation)/launch/gmapping_demo.launch" />

  <include file="$(find frontier_exploration)/launch/global_map.launch" />

  <node name="send_exploration_goal" pkg="turtlebot_demos" type="send_exploration_goal"/>
     <param name="set_linear_vel" value="0.1" />
     <param name="set_angular_vel" value="0.1" />
  </node>

</launch>

And here is a skeleton of the node script:

#include ...

void function()
{ 
   ....
}

int main(int arcg, char** argv)
{
  ....
   float set_linear_vel = 0.25;
   float set_angular_vel = 0.50;
  ....
 }
  1. My first question is, am I doing this right?
  2. Second, does it matter where I define the variables in the node script? Should they be defined as global variables, defined inside int main(), or inside void function()?

Thanks!