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

swaroophs's profile - activity

2021-09-15 10:00:30 -0500 received badge  Famous Question (source)
2021-05-17 10:02:43 -0500 received badge  Famous Question (source)
2021-05-17 10:02:43 -0500 received badge  Notable Question (source)
2020-09-28 18:41:28 -0500 received badge  Popular Question (source)
2020-09-15 07:21:04 -0500 received badge  Famous Question (source)
2020-09-04 02:43:00 -0500 received badge  Famous Question (source)
2020-08-02 18:38:04 -0500 received badge  Notable Question (source)
2020-07-24 17:52:29 -0500 received badge  Notable Question (source)
2020-07-14 03:38:02 -0500 received badge  Popular Question (source)
2020-07-14 01:36:39 -0500 marked best answer Getting CMake warning because of CMP0048 even after bumping up CMake Minimum Version

Working on building and testing my ROS package in noetic. I get the following warning:

CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

    project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.

I have edited my CMakeLists.txt to have the following line to bump up minimum version of CMake:

cmake_minimum_required(VERSION 3.0.2)

Similar to this.

But I am still getting the warning. Am I missing something? I am not seeing this in my melodic build.

Edit: My CMakeLists.txt looks like below:

cmake_minimum_required(VERSION 3.0.2)
project(rosrect-listener-agent)
find_package(catkin REQUIRED COMPONENTS
  roscpp
  roslib
  rosgraph_msgs
  std_msgs
)
set(cpprestsdk_DIR /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/cmake/)
find_package(OpenSSL REQUIRED)
find_package(cpprestsdk REQUIRED)

add_library(rosrect-listener-agent-lib src/backend_api.cpp src/robot_event.cpp src/state_manager.cpp)
target_link_libraries(rosrect-listener-agent-lib ${catkin_LIBRARIES} cpprestsdk::cpprest)
add_executable(rosrect-listener-agent src/listener_agent.cpp )
target_link_libraries(rosrect-listener-agent
  ${catkin_LIBRARIES}
  rosrect-listener-agent-lib
  cpprestsdk::cpprest
)
add_dependencies(rosrect-listener-agent ${rosrect-listener-agent_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})

#############
## Testing ##
#############
if(CATKIN_ENABLE_TESTING AND ENABLE_COVERAGE_TESTING)
  find_package(code_coverage REQUIRED)
  # Add compiler flags for coverage instrumentation before defining any targets
  APPEND_COVERAGE_COMPILER_FLAGS()
endif()
if(CATKIN_ENABLE_TESTING)
  find_package(rostest REQUIRED)

  # Unit tests for utility classes as just gtest
  catkin_add_gtest(backend_test_node test/utests_backendapi.cpp)
  catkin_add_gtest(robotevent_test_node test/utests_robotevent.cpp)
  catkin_add_gtest(statemanager_test_node test/utests_statemanager.cpp)

  # Integration test for listener agent node as rostest
  add_rostest_gtest(listeneragent_test_node_ros test/listener_integration_test_ros.test test/itest_listeneragent_ros.cpp)
  add_rostest_gtest(listeneragent_test_node_db test/listener_integration_test_db.test test/itest_listeneragent_db.cpp)

  target_link_libraries(backend_test_node ${catkin_LIBRARIES} rosrect-listener-agent-lib cpprestsdk::cpprest)
  target_link_libraries(robotevent_test_node ${catkin_LIBRARIES} rosrect-listener-agent-lib cpprestsdk::cpprest)
  target_link_libraries(statemanager_test_node ${catkin_LIBRARIES} rosrect-listener-agent-lib cpprestsdk::cpprest)
  target_link_libraries(listeneragent_test_node_ros ${catkin_LIBRARIES} rosrect-listener-agent-lib cpprestsdk::cpprest)
  target_link_libraries(listeneragent_test_node_db ${catkin_LIBRARIES} rosrect-listener-agent-lib cpprestsdk::cpprest)

  if(ENABLE_COVERAGE_TESTING)
    set(COVERAGE_EXCLUDES "*/${PROJECT_NAME}/test*" "*/${PROJECT_NAME}/include/${PROJECT_NAME}/*.h")
    add_code_coverage(
      NAME ${PROJECT_NAME}_coverage_report
      # DEPENDENCIES tests
    )
  endif()
endif()
2020-07-14 01:36:36 -0500 commented answer Getting CMake warning because of CMP0048 even after bumping up CMake Minimum Version

Thanks @Dirk. I am just using catkin_make. I tried the patch of just adding project(Project) to the top-level CMake and

2020-07-13 23:40:31 -0500 commented answer Getting CMake warning because of CMP0048 even after bumping up CMake Minimum Version

Thanks @Dirk. I have pasted the contents of my CMakeLists.txt file above. I do have the project specified right below cm

2020-07-13 23:39:09 -0500 edited question Getting CMake warning because of CMP0048 even after bumping up CMake Minimum Version

Getting CMake warning because of CMP0048 even after bumping up CMake Minimum Version Working on building and testing my

2020-07-13 22:34:54 -0500 asked a question Getting CMake warning because of CMP0048 even after bumping up CMake Minimum Version

Getting CMake warning because of CMP0048 even after bumping up CMake Minimum Version Working on building and testing my

2020-06-22 07:10:14 -0500 received badge  Famous Question (source)
2020-06-12 04:38:43 -0500 commented question How to create a rosnode to read canbus data?

Rather than recreating something that exists, I would recommend you research what kind of ROS support is already availab

2020-06-12 04:18:09 -0500 commented question ROS2, No executable found

Do you see the executable when you run? ros2 pkg executables <pkg_name>

2020-06-11 00:51:09 -0500 received badge  Student (source)
2020-06-11 00:31:11 -0500 edited question How to get a ROS 2 node's log folder/file?

How to get a ROS 2 node's log folder/file? When I launch my node, I get a prompt that looks like this: [INFO] [launch]:

2020-06-11 00:10:51 -0500 asked a question How to get a ROS 2 node's log folder/file?

How to get a ROS 2 node's log folder/file? When I launch my node, I get a prompt that looks like this: [INFO] [launch]:

2020-06-10 00:22:13 -0500 received badge  Enthusiast
2020-06-08 21:54:04 -0500 received badge  Popular Question (source)
2020-06-08 21:44:17 -0500 commented answer ros1_bridge build error for Turtlebot3

Thanks @Dirk for commenting on this so quickly! I tried out the patch in __init__.py locally and it works! P.S: Thanks

2020-06-08 21:41:30 -0500 marked best answer ros1_bridge build error for Turtlebot3

Hello all,

I am trying to build ros1_bridge from source and facing the following issue. Any idea where I am going wrong? It seems to be pointing to Turtlebot3's sound message/service:

$ colcon build --packages-select ros1_bridge --cmake-force-configure --cmake-args -DBUILD_TESTING=FALSE
Starting >>> ros1_bridge
[Processing: ros1_bridge]                            
[Processing: ros1_bridge]                                    
--- stderr: ros1_bridge                                      
CMakeFiles/ros1_bridge.dir/generated/turtlebot3_msgs__srv__Sound__factories.cpp.o: In function `ros1_bridge::Factory<turtlebot3_msgs::Sound_<std::allocator<void> >, turtlebot3_msgs::msg::Sound_<std::allocator<void> > >::convert_1_to_2(turtlebot3_msgs::Sound_<std::allocator<void> > const&, turtlebot3_msgs::msg::Sound_<std::allocator<void> >&)':
turtlebot3_msgs__srv__Sound__factories.cpp:(.text+0x284): multiple definition of `ros1_bridge::Factory<turtlebot3_msgs::Sound_<std::allocator<void> >, turtlebot3_msgs::msg::Sound_<std::allocator<void> > >::convert_1_to_2(turtlebot3_msgs::Sound_<std::allocator<void> > const&, turtlebot3_msgs::msg::Sound_<std::allocator<void> >&)'
CMakeFiles/ros1_bridge.dir/generated/turtlebot3_msgs__msg__Sound__factories.cpp.o:turtlebot3_msgs__msg__Sound__factories.cpp:(.text+0x284): first defined here
CMakeFiles/ros1_bridge.dir/generated/turtlebot3_msgs__srv__Sound__factories.cpp.o: In function `ros1_bridge::Factory<turtlebot3_msgs::Sound_<std::allocator<void> >, turtlebot3_msgs::msg::Sound_<std::allocator<void> > >::convert_2_to_1(turtlebot3_msgs::msg::Sound_<std::allocator<void> > const&, turtlebot3_msgs::Sound_<std::allocator<void> >&)':
turtlebot3_msgs__srv__Sound__factories.cpp:(.text+0x2a0): multiple definition of `ros1_bridge::Factory<turtlebot3_msgs::Sound_<std::allocator<void> >, turtlebot3_msgs::msg::Sound_<std::allocator<void> > >::convert_2_to_1(turtlebot3_msgs::msg::Sound_<std::allocator<void> > const&, turtlebot3_msgs::Sound_<std::allocator<void> >&)'
CMakeFiles/ros1_bridge.dir/generated/turtlebot3_msgs__msg__Sound__factories.cpp.o:turtlebot3_msgs__msg__Sound__factories.cpp:(.text+0x2a0): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [libros1_bridge.so] Error 1
make[1]: *** [CMakeFiles/ros1_bridge.dir/all] Error 2
make: *** [all] Error 2
---
Failed   <<< ros1_bridge    [ Exited with code 2 ]

Summary: 0 packages finished [1min 3s]
  1 package failed: ros1_bridge
  1 package had stderr output: ros1_bridge

These are my steps:

Terminal 1:

Source ROS 1 workspace:

$ source /opt/ros/melodic/setup.bash
$ source ~/catkin_ws/devel/setup.bash

Terminal 2:

Source ROS 2 workspace:

$ source /opt/ros/dashing/setup.bash
$ source ~/ros2_dd_ws/install/setup.bash

Terminal 3:

ros1_bridge workspace get source:

$ cd ~/ros1_bridge_ws/src
$ git clone -b dashing https://github.com/ros2/ros1_bridge.git
$ . ~/catkin_ws/devel/setup.bash
$ . ~/colcon_ws/install/setup.bash
ROS_DISTRO was set to 'melodic' before. Please make sure that the environment does not mix paths from different distributions.

Verify environment:

$ echo $CMAKE_PREFIX_PATH | tr ':' '\n'
/home/swaroophs/ros2_dd_ws/install/rosrect-listener-agent
/home/swaroophs/catkin_ws/devel
/opt/ros/melodic

ros1_bridge build (FAILS):

$ colcon build --packages-select ros1_bridge --cmake-force-configure --cmake-args -DBUILD_TESTING=FALSE
Starting >>> ros1_bridge
[Processing: ros1_bridge]                            
[Processing: ros1_bridge]                                    
--- stderr: ros1_bridge                                      
CMakeFiles/ros1_bridge.dir/generated/turtlebot3_msgs__srv__Sound__factories.cpp.o: In function `ros1_bridge::Factory<turtlebot3_msgs::Sound_<std::allocator<void> >, turtlebot3_msgs::msg::Sound_<std::allocator<void> > >::convert_1_to_2(turtlebot3_msgs::Sound_<std::allocator<void> > const&, turtlebot3_msgs::msg::Sound_<std::allocator<void> >&)':
turtlebot3_msgs__srv__Sound__factories.cpp:(.text+0x284): multiple definition of `ros1_bridge::Factory<turtlebot3_msgs::Sound_<std::allocator<void> >, turtlebot3_msgs::msg::Sound_<std::allocator<void> > >::convert_1_to_2(turtlebot3_msgs::Sound_<std::allocator<void> > const&, turtlebot3_msgs::msg::Sound_<std::allocator<void> >&)'
CMakeFiles/ros1_bridge.dir/generated/turtlebot3_msgs__msg__Sound__factories.cpp.o:turtlebot3_msgs__msg__Sound__factories.cpp:(.text+0x284): first defined here
CMakeFiles/ros1_bridge.dir/generated/turtlebot3_msgs__srv__Sound__factories.cpp.o: In function `ros1_bridge::Factory<turtlebot3_msgs::Sound_<std::allocator<void> >, turtlebot3_msgs::msg::Sound_<std::allocator<void> > >::convert_2_to_1(turtlebot3_msgs::msg::Sound_<std::allocator<void> > const&, turtlebot3_msgs::Sound_<std::allocator<void> >&)':
turtlebot3_msgs__srv__Sound__factories.cpp:(.text+0x2a0): multiple definition of `ros1_bridge::Factory<turtlebot3_msgs::Sound_<std::allocator<void> >, turtlebot3_msgs::msg::Sound_<std::allocator<void> > >::convert_2_to_1(turtlebot3_msgs::msg::Sound_<std::allocator<void> > const&, turtlebot3_msgs::Sound_<std ...
(more)
2020-06-08 21:41:30 -0500 received badge  Scholar (source)
2020-06-08 00:27:37 -0500 asked a question ros1_bridge build error for Turtlebot3

ros1_bridge build error for Turtlebot3 Hello all, I am trying to build ros1_bridge from source and facing the followin

2020-06-01 12:13:53 -0500 received badge  Notable Question (source)
2020-05-20 03:50:40 -0500 commented question How to use launch_testing for testing executables created by cpp ros2 nodes?

Hello! I have this exact same question. Did you by chance figure out what to use for cpp ros2 nodes? I am just leaning t

2020-05-17 12:19:35 -0500 received badge  Notable Question (source)
2020-05-13 21:34:33 -0500 received badge  Popular Question (source)
2020-05-06 04:08:23 -0500 commented answer ROS2 with Turtlebot3 Simulation

You are correct! I figured out the same thing after pouring through a bunch of GitHub issues (this and this) and then lo

2020-05-06 04:07:04 -0500 received badge  Supporter (source)
2020-05-06 04:07:03 -0500 commented answer ROS2 with Turtlebot3 Simulation

You are correct! I figured out the same thing after pouring through a bunch of GitHub issues (this and this) and then lo

2020-05-05 04:04:46 -0500 edited question ROS2 with Turtlebot3 Simulation

ROS2 with Turtlebot3 Simulation I wanted to play with ROS2 today. I started of installing Dashing then uninstalling it

2020-05-05 04:04:46 -0500 received badge  Editor (source)
2020-05-05 04:02:29 -0500 asked a question ROS2 with Turtlebot3 Simulation

ROS2 with Turtlebot3 Simulation I just installed ROS2 Eloquent today using these instructions. I also installed ROS2 Tur

2020-05-05 03:44:40 -0500 edited answer Do rostest test nodes publish to rosout?

After further research it DOES look like rostest nodes DO NOT automatically publish to /rosout and hence /rosout_agg. So

2020-05-05 03:44:08 -0500 answered a question Do rostest test nodes publish to rosout?

After further research it DOES look like rostest nodes DO NOT automatically publish to /rosout and hence /rosout_agg. So

2020-05-05 03:41:33 -0500 received badge  Popular Question (source)
2020-04-22 09:03:32 -0500 commented question Do rostest test nodes publish to rosout?

Thanks for the comment! Yes info and debug wont be shown unless a test node logger level is set otherwise. But I’m not s

2020-04-22 05:06:52 -0500 asked a question Do rostest test nodes publish to rosout?

Do rostest test nodes publish to rosout? Hello all, Some background. I am new to writing unit tests in gtests/rostest.