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

sam's profile - activity

2023-03-17 09:19:16 -0500 received badge  Good Question (source)
2022-08-23 11:10:28 -0500 marked best answer Is ROS able to cancel the limit of karma to upload pictures?

If the new user of ROS have some pictures to describe question clearly,it is very sad to see that he doesn't have enough karma to upload pictures.

So I ask if there is possible to make new user also can upload pictures to describe his/her questions.

Thank you~

2022-08-03 20:41:17 -0500 received badge  Nice Question (source)
2022-07-08 01:17:50 -0500 marked best answer How to disable "Policy CMP0045 is not set" warnings?

I only create catkin package without edit anything.

When I catkin_make , it shows a lots of warnings.

It makes me very hard to see the other error or warnings.

The full log:

sam@sam:~/code/ros_hydro$ catkin_make
Base path: /home/sam/code/ros_hydro
Source space: /home/sam/code/ros_hydro/src
Build space: /home/sam/code/ros_hydro/build
Devel space: /home/sam/code/ros_hydro/devel
Install space: /home/sam/code/ros_hydro/install
####
#### Running command: "make cmake_check_build_system" in "/home/sam/code/ros_hydro/build"
####
####
#### Running command: "make -j8 -l8" in "/home/sam/code/ros_hydro/build"
####
sam@sam:~/code/ros_hydro$ catkin_make
Base path: /home/sam/code/ros_hydro
Source space: /home/sam/code/ros_hydro/src
Build space: /home/sam/code/ros_hydro/build
Devel space: /home/sam/code/ros_hydro/devel
Install space: /home/sam/code/ros_hydro/install
####
#### Running command: "cmake /home/sam/code/ros_hydro/src -DCATKIN_DEVEL_PREFIX=/home/sam/code/ros_hydro/devel -DCMAKE_INSTALL_PREFIX=/home/sam/code/ros_hydro/install" in "/home/sam/code/ros_hydro/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/sam/code/ros_hydro/devel
-- Using CMAKE_PREFIX_PATH: /home/sam/code/ros_hydro/devel;/opt/ros/hydro
-- This workspace overlays: /home/sam/code/ros_hydro/devel;/opt/ros/hydro
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Python version: 2.7
-- Using Debian Python package layout
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/sam/code/ros_hydro/build/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
CMake Warning (dev) at /opt/ros/hydro/share/catkin/cmake/tools/doxygen.cmake:40 (GET_TARGET_PROPERTY):
  Policy CMP0045 is not set: Error on non-existent target in
  get_target_property.  Run "cmake --help-policy CMP0045" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  get_target_property() called with non-existent target "doxygen".
Call Stack (most recent call first):
  /opt/ros/hydro/share/catkin/cmake/all.cmake:148 (include)
  /opt/ros/hydro/share/catkin/cmake/catkinConfig.cmake:20 (include)
  CMakeLists.txt:52 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- catkin 0.5.90
-- BUILD_SHARED_LIBS is on
WARNING: Package "ompl" does not follow the version conventions. It should not contain leading zeros (unless the number is 0).
WARNING: Package "libg2o" does not follow the version conventions. It should not contain leading zeros (unless the number is 0).
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 1 packages in topological order:
-- ~~  - sam_industrial_robot1
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'sam_industrial_robot1'
-- ==> add_subdirectory(sam_industrial_robot1)
CMake Warning (dev) at /opt/ros/hydro/share/cpp_common/cmake/cpp_commonConfig.cmake:100 (elseif):
  Policy CMP0054 is not set: Only interpret if() arguments as variables or
  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  Quoted variables like "include" will no longer be dereferenced when the
  policy is set to NEW.  Since the policy is not set the OLD behavior will be
  used.
Call Stack (most recent call first):
  /opt/ros/hydro/share/roscpp/cmake/roscppConfig.cmake:165 (find_package)
  /opt/ros/hydro/share/catkin/cmake/catkinConfig.cmake:75 (find_package)
  sam_industrial_robot1/CMakeLists.txt:7 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /opt/ros/hydro ...
(more)
2022-02-28 10:22:26 -0500 marked best answer Why ROS Topic should get XMLRPC address:port but ROS Service doesn't?

I followed ROS Introduction (Radu Bogdan Rusu) in Events/CoTeSys-OS-School.

This is ROS Topic mechanism: image description

I can see in step 2, Listener get Talker's XML/RPC's address:port.

This is ROS Service mechanism: image description

I can see in step 2, Listener get Talker's XML/RPC's data address:port.

My question is why ROS topic should let Listener get its XML/RPC's address:port but ROS Service doesn't?

By the way:

1.what is second picture's step 3? Is step 3 is Listener making a data port connection(foo:3456) to Talker?

2.Is "foo" a IP address?

Thank you~

2022-02-28 10:20:19 -0500 received badge  Nice Question (source)
2022-01-08 13:50:25 -0500 received badge  Great Question (source)
2021-10-14 06:07:52 -0500 received badge  Favorite Question (source)
2021-07-18 05:12:21 -0500 received badge  Great Question (source)
2021-07-18 05:12:17 -0500 marked best answer How to solve 'undefined reference to `ros::init' on Groovy?

I use ROS groovy on ubuntu 12.04 64 bits.

I try to write the simplest program.

I run:

  roscd
  cd ../src
  catkin_create_pkg sam_hello roscpp
  roscd sam_hello

src/sam_hello_src1.cpp:

  #include <ros/ros.h>

  int main(int argc,char **argv)
  {
      ros::init(argc,argv, "sam_hello_node");
      ros::spin();
      return 0;
  }

Then I edit CMakeLists.txt,add a line:

  add_executable(sam_hello_node src/sam_hello_src1.cpp)

Then I try to make:

  roscd
  cd ..
  catkin_make

It shows:

  sam@sam:~/code/ros_groovy$ catkin_make
  Base path: /home/sam/code/ros_groovy
  Source space: /home/sam/code/ros_groovy/src
  Build space: /home/sam/code/ros_groovy/build
  Devel space: /home/sam/code/ros_groovy/devel
  Install space: /home/sam/code/ros_groovy/install
  ####
  #### Running command: "make cmake_check_build_system" in "/home/sam/code/ros_groovy/build"
  ####
  ####
  #### Running command: "make -j4 -l4" in "/home/sam/code/ros_groovy/build"
  ####
  Scanning dependencies of target sam_hello_node
  [100%] Building CXX object sam_hello/CMakeFiles/sam_hello_node.dir/src/sam_hello_src1.cpp.o
  Linking CXX executable /home/sam/code/ros_groovy/devel/lib/sam_hello/sam_hello_node
  CMakeFiles/sam_hello_node.dir/src/sam_hello_src1.cpp.o: In function `main':
  sam_hello_src1.cpp:(.text+0x46): undefined reference to `ros::init(int&, char**, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int)'
  sam_hello_src1.cpp:(.text+0x63): undefined reference to `ros::spin()'
  collect2: ld 回傳 1
  make[2]: *** [/home/sam/code/ros_groovy/devel/lib/sam_hello/sam_hello_node] Error 1
  make[1]: *** [sam_hello/CMakeFiles/sam_hello_node.dir/all] Error 2
  make: *** [all] Error 2
  Invoking "make" failed
  sam@sam:~/code/ros_groovy$

How to solve it?

Thank you~

---The following is the process that I setup groovy environments---

Commands:

  source /opt/ros/groovy/setup.sh
  mkdir -p ~/code/ros_groovy/src
  cd ~/code/ros_groovy/src
  catkin_init_workspace
  cd ~/code/ros_groovy/
  catkin_make
  echo 'source $HOME/code/ros_groovy/devel/setup.bash' >> ~/.bashrc
  source devel/setup.bash

Setting process:

  sam@sam:~$ source /opt/ros/groovy/setup.sh
  sam@sam:~$ mkdir -p ~/code/ros_groovy/src
  sam@sam:~$ cd ~/code/ros_groovy/src
  sam@sam:~/code/ros_groovy/src$ catkin_init_workspace
  Creating symlink "/home/sam/code/ros_groovy/src/CMakeLists.txt" pointing to "/opt/ros/groovy/share/catkin/cmake/toplevel.cmake"
  sam@sam:~/code/ros_groovy/src$ cd ~/code/ros_groovy/
  sam@sam:~/code/ros_groovy$ catkin_make
  Base path: /home/sam/code/ros_groovy
  Source space: /home/sam/code/ros_groovy/src
  Build space: /home/sam/code/ros_groovy/build
  Devel space: /home/sam/code/ros_groovy/devel
  Install space: /home/sam/code/ros_groovy/install
  ####
  #### Running command: "cmake /home/sam/code/ros_groovy/src -DCATKIN_DEVEL_PREFIX=/home/sam/code/ros_groovy/devel -DCMAKE_INSTALL_PREFIX=/home/sam/code/ros_groovy/install" in "/home/sam/code/ros_groovy/build"
  ####
  -- The C compiler identification is GNU
  -- The CXX compiler identification is GNU
  -- Check for working C compiler: /usr/bin/gcc
  -- Check for working C compiler: /usr/bin/gcc -- works
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working CXX compiler: /usr/bin/c++
  -- Check for working CXX compiler: /usr/bin/c++ -- works
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Using CATKIN_DEVEL_PREFIX: /home/sam/code/ros_groovy/devel
  -- Using CMAKE_PREFIX_PATH: /opt/ros/groovy
  -- This workspace overlays: /opt/ros/groovy
  -- Found PythonInterp: /usr/bin/python ...
(more)
2021-06-17 16:14:37 -0500 marked best answer How to solve 'file 'rviz2.launch.py' was not found in the share directory of package'?

I'm using ROS2 Dashing on ubuntu 18.04 64bits.

I have run:

cd ~/ros2_overlay_ws/src/
ros2 pkg create sam_empty_package_with_rviz2
cd ~/ros2_overlay_ws/src/sam_empty_package_with_rviz2
mkdir -p rviz2/
mkdir -p launch/

vim launch/rviz2.launch.py

import os

from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch_ros.actions import Node


def generate_launch_description():
    rviz_config_dir = os.path.join(
            get_package_share_directory('sam_empty_package_with_rviz2'),
            'rviz2',
            'sam_empty_package_with_rviz2.rviz')

    return LaunchDescription([
        Node(
            package='rviz2',
            node_executable='rviz2',
            node_name='rviz2',
            arguments=['-d', rviz_config_dir],
            output='screen'),
    ])

Compile:

colcon build --packages-select sam_empty_package_with_rviz2

After compile I run:

ros2 launch sam_empty_package_with_rviz2 rviz2.launch.py

And I got errors:

sam@sam-ub1804:~$ ros2 launch sam_empty_package_with_rviz2 rviz2.launch.py
file 'rviz2.launch.py' was not found in the share directory of package 'sam_empty_package_with_rviz2' which is at '/home/sam/ros2_dashing_overlay_ws/install/sam_empty_package_with_rviz2/share/sam_empty_package_with_rviz2'
sam@sam-ub1804:~$

How to solve it?

Thank you~

2021-05-17 18:16:00 -0500 received badge  Favorite Question (source)
2021-05-17 18:15:47 -0500 received badge  Good Question (source)
2021-05-08 14:25:27 -0500 received badge  Nice Question (source)
2021-02-15 10:36:20 -0500 received badge  Great Question (source)
2021-02-12 10:08:32 -0500 received badge  Nice Question (source)
2021-01-20 14:57:57 -0500 marked best answer When to use param and rosparam on launch file?

For param example:

 <launch>
   <!-- send table urdf to param server -->
   <param name="table_description" command="$(find      xacro)/xacro.py $(find gazebo_worlds)/objects/table.urdf.xacro" />

   <!-- push table_description to factory and spawn robot in      gazebo -->
   <node name="spawn_table" pkg="gazebo" type="spawn_model"      args="-urdf -param table_description -z 0.01 -model table_model"      respawn="false" output="screen" />
 </launch>

For rosparam example:

 <launch>
   <node name="fake_localizaton" type="fake_localization"      pkg="fake_localization">
     <rosparam>
       odom_frame_id: odom_combined
       base_frame_id: base_footprint
     </rosparam>
   </node>
 </launch>

What's their difference?

What's the case of using them?

Thank you~

2021-01-10 03:14:17 -0500 marked best answer What's the difference between global and local costmap's static_map?

In navigation tutorial : http://www.ros.org/wiki/navigation/Tu...

I found that in global_costmap_params.yaml exist static_map: true.

Also in local_costmap_params.yaml exist static_map: false.

What's the difference between them?

Why global set to true,and local set to false?

If I want to do online slam with gmapping(means dynamically build a map when navigation), what setting should I use?

Thank you~

2021-01-07 11:32:21 -0500 received badge  Nice Question (source)
2020-12-14 09:53:05 -0500 marked best answer When should I need --clock parameter on rosbag play?

I can't find any doc about parameter of rosbag play.

In rosbag video told that parameter.

How to use --clock parameter?

Thank you~

2020-12-04 22:22:40 -0500 marked best answer Why roslaunch couldn't show the ROS_INFO message?

node_test.cpp

 #include "ros/ros.h"

 int main(int argc, char **argv)
 {
    //ROS的初始化
    ros::init(argc, argv, "basic_node");
    ROS_INFO("%s","Hello World!!");
    //讓ROS進入無窮迴圈,但能進行事件處理
    ros::spin();
    return 0;
 }

basic.launch

 <launch>
    <node pkg="basic_node" name="basic" type="basicNode"/>
 </launch>

Just run is ok:

 sam@/home/sam/code/ros/node/basic_node$ ./bin/basicNode 
 [ INFO] [1316858268.471014429]: Hello World!!

Why I run with roslaunch is not ok?

 sam@/home/sam/code/ros/node/basic_node$ roslaunch basic_node      basic.launch 
 ... logging to      /home/sam/.ros/log/afeaec82-e691-11e0-9f34-20cf30a2382f/roslaunch-sam-Syst     em-Product-Name-11412.log
 Checking log directory for disk usage. This may take awhile.
 Press Ctrl-C to interrupt
 Done checking log file disk usage. Usage is <1GB.

 started roslaunch server http://sam-System-Product-Name:41031/

 SUMMARY
 ========

 PARAMETERS
  * /rosversion
  * /rosdistro

 NODES
   /
     basic (basic_node/basicNode)

 ROS_MASTER_URI=http://localhost:11311

 core service [/rosout] found
 process[basic-1]: started with pid [11430]

How to show message on roslaunch?

Thank you~

2020-11-09 13:20:22 -0500 marked best answer How do I install a missing ROS package?

hello, How do I install packages that I can't use roscd to find?

I try to type something like rosdep install pr2_2dnav_gazebo, and I got:

sam@sam-desktop:~/code/ros$ rosdep install pr2_2dnav_gazebo
executing this script:
 set -o errexit
#No Packages to install
sam@sam-desktop:~/code/ros$

Then I try to open another try to use roscd but failed again... How I install any package I missed like pr2_2dnav_gazebo? Or how I install all packages on ros.org? thank you~

2020-08-20 13:39:33 -0500 marked best answer transform base_link to base_laser,map,odom

I know the meaning of transform base_link to base_laser.

But what is the meaning of transform base_link to map?

What is the meaning of transform base_link to odom?

Because I need the meaning to set the correct value in navigation program.

Thank you~