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

tobyhijzen's profile - activity

2023-01-10 10:01:37 -0500 marked best answer catkin build run_tests stuck in a loop.

I've implemented a simpel unit test following the guide here. When I build the code using catkin build everything is fine. But when I build the tests using catkin build package_name --catkin-make-args run_tests catkin gets stuck in an infinite loop. If I remove the nodehandle in the utest.cpp file everything is fine. Help!

I'm not sure if this is a bug in catkin_tools or on my end. Hence I created an issue in the catkin_tools repository catkin/catkin_tools#517.

PS I'm using ROS kinetic, on ubuntu 16.04 (kernel 4.15.0-23).

Heres my code (test/utest.cpp):

#include <ros/ros.h>
#include <gtest/gtest.h>

TEST(TestSuite, testCase1)
{
}

int main(int argc, char **argv){
  testing::InitGoogleTest(&argc, argv);
  ros::init(argc, argv, "tester");
  ros::NodeHandle nh;
  return RUN_ALL_TESTS();
}

And here is the CmakeLists.txt:

find_package(catkin REQUIRED COMPONENTS  roscpp  std_msgs)
cmake_minimum_required(VERSION 2.8.3)
project(object_motion_prediction)
catkin_package(CATKIN_DEPENDS roscpp)
include_directories(include ${catkin_INCLUDE_DIRS})
catkin_add_gtest(utest test/utest.cpp)# src/motion_prediction.cpp)
target_link_libraries(utest ${catkin_LIBRARIES})

Additional CMake Args:

-DCMAKE_CXX_STANDARD=11 -DCMAKE_BUILD_TYPE=Release -GCodeBlocks - Unix Makefiles

The build seems to be stuck on this command:

catkin env -si  /usr/bin/make run_tests --jobserver-fds=6,7 -j

For the full output:

$ VERBOSE=1 catkin build unit_test_test -v -p1 --catkin-make-args run_tests
-------------------------------------------------------------------------------
Profile:                     default
Extending:        [explicit] /opt/ros/kinetic
Workspace:                   /home/toby/wepods_ws
-------------------------------------------------------------------------------
Source Space:       [exists] /home/toby/wepods_ws/src
Log Space:          [exists] /home/toby/wepods_ws/logs
Build Space:        [exists] /home/toby/wepods_ws/build
Devel Space:        [exists] /home/toby/wepods_ws/devel
Install Space:      [exists] /home/toby/wepods_ws/install
DESTDIR:            [unused] None
-------------------------------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        merged
-------------------------------------------------------------------------------
Additional CMake Args:       -DCMAKE_CXX_STANDARD=11 -DCMAKE_BUILD_TYPE=Release -GCodeBlocks - Unix Makefiles
Additional Make Args:        None
Additional catkin Make Args: run_tests
Internal Make Job Server:    True
Cache Job Environments:      False
-------------------------------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
-------------------------------------------------------------------------------
Workspace configuration appears valid.
-------------------------------------------------------------------------------
[build] Found '21' packages in 0.0 seconds.                                   
Starting  >>> unit_test_test                                                  
Starting   >> unit_test_test:loadenv                                          
Output     << unit_test_test:loadenv /home/toby/wepods_ws/logs/unit_test_test/build.loadenv.005.log
Loading environment from: /home/toby/wepods_ws/install/env.sh
Finished   << unit_test_test:loadenv                                          
Starting   >> unit_test_test:mkdir                                            
Starting   >> unit_test_test:mkdir                                            
Starting   >> unit_test_test:cache-manifest                                   
Starting   >> unit_test_test:check                                            
Subprocess  > unit_test_test:check `cd /home/toby/wepods_ws/build/unit_test_test; catkin build --get-env unit_test_test | catkin env -si  /usr/bin/make cmake_check_build_system; cd -`
Output     << unit_test_test:check /home/toby/wepods_ws/logs/unit_test_test/build.check.004.log
/usr/bin/cmake -H/home/toby/wepods_ws/src/wepods_ros/unit_test_test -B/home/toby/wepods_ws/build/unit_test_test --check-build-system CMakeFiles/Makefile.cmake 0
cd /home/toby/wepods_ws/build/unit_test_test; catkin build --get-env unit_test_test | catkin env -si  /usr/bin/make cmake_check_build_system; cd -
Finished   << unit_test_test:check                                            
Starting   >> unit_test_test:make                                             
Subprocess  > unit_test_test:make `cd /home/toby/wepods_ws/build/unit_test_test; catkin build --get-env unit_test_test | catkin env -si  /usr/bin/make run_tests --jobserver-fds=6,7 -j; cd -`
^C[build] Interrupted by user!
2023-01-10 10:01:37 -0500 received badge  Enlightened (source)
2023-01-10 10:01:34 -0500 received badge  Good Answer (source)
2021-07-08 00:33:08 -0500 received badge  Student (source)
2020-12-09 09:14:08 -0500 received badge  Famous Question (source)
2020-08-19 23:20:42 -0500 received badge  Good Answer (source)
2020-06-25 02:20:16 -0500 received badge  Nice Answer (source)
2020-05-24 14:55:12 -0500 received badge  Notable Question (source)
2020-02-24 08:08:13 -0500 received badge  Popular Question (source)
2019-12-18 08:41:47 -0500 received badge  Enthusiast
2019-12-04 05:36:29 -0500 received badge  Organizer (source)
2019-12-04 05:35:17 -0500 asked a question Running tests through `add_rostest_gtest` cannot find test executable

Running tests through `add_rostest_gtest` cannot find test executable I'm trying to run some integrations tests on my no

2019-05-17 08:03:47 -0500 received badge  Nice Answer (source)
2019-03-11 13:46:07 -0500 received badge  Self-Learner (source)
2018-12-11 04:11:26 -0500 received badge  Famous Question (source)
2018-06-12 07:01:51 -0500 commented answer catkin build run_tests stuck in a loop.

I used to work there too, hence the question ;-) bedankt voor de hulp!

2018-06-12 06:56:10 -0500 commented answer catkin build run_tests stuck in a loop.

That makes sense but it normally if I miss a roscore I get a warning. PS did you enjoy your cake?

2018-06-12 06:54:59 -0500 commented answer catkin build run_tests stuck in a loop.

That makes sense but it normally if I miss a roscore I get a warning.

2018-06-12 05:42:22 -0500 answered a question catkin build run_tests stuck in a loop.

It turns out there is no roscore running when performing a catkin build <package> --catkin-make-args run_tests. Wh

2018-06-12 05:37:17 -0500 received badge  Notable Question (source)
2018-06-12 03:49:24 -0500 commented question catkin build run_tests stuck in a loop.

What you see is in verbose mode. How do I run it with catkin_make?

2018-06-12 02:55:00 -0500 edited question catkin build run_tests stuck in a loop.

catkin build run_tests stuck in a loop. I've implemented a simpel unit test following the guide here. When I build the c

2018-06-12 02:52:45 -0500 commented question catkin build run_tests stuck in a loop.

@gvdhoorn I'm not sure if this is a bug on my end or in catkin tools. Hence the duplication. I'll mention the connection

2018-06-12 02:47:25 -0500 commented question catkin build run_tests stuck in a loop.

@gvdhoorn what shall I do then? Remove this post?

2018-06-12 02:23:45 -0500 received badge  Popular Question (source)
2018-06-12 02:18:16 -0500 commented question catkin build run_tests stuck in a loop.

The timer: [build - 03:51.2] [0/1 complete] [1/4 jobs] ... keeps running indefinitely

2018-06-12 02:16:47 -0500 edited question catkin build run_tests stuck in a loop.

catkin build run_tests stuck in a loop. I've implemented a simpel unit test following the guide here. When I build the c

2018-06-12 02:16:30 -0500 edited question catkin build run_tests stuck in a loop.

catkin build run_tests stuck in a loop. I've implemented a simpel unit test following the guide here. When I build the c

2018-06-12 00:42:56 -0500 edited question catkin build run_tests stuck in a loop.

catkin build run_tests stuck in a loop. I've implemented a simpel unit test following the guide here. When I build the c

2018-06-12 00:34:00 -0500 edited question catkin build run_tests stuck in a loop.

catkin build run_tests stuck in a loop. I've implemented a simpel unit test following the guide here. When I build the c

2018-06-12 00:31:48 -0500 commented question catkin build run_tests stuck in a loop.

The build is stuck.

2018-06-11 23:51:38 -0500 edited question catkin build run_tests stuck in a loop.

catkin build run_tests stuck in a loop. I've implemented a simpel unit test following the guide here. When I build the c

2018-06-11 23:49:49 -0500 received badge  Editor (source)
2018-06-11 23:49:49 -0500 edited question catkin build run_tests stuck in a loop.

catkin build run_tests stuck in a loop. I've implemented the code from here in my own package without any modifications.

2018-06-11 23:48:39 -0500 edited question catkin build run_tests stuck in a loop.

catkin build run_tests stuck in a loop. I've implemented the code from here in my own package without any modifications.

2018-06-11 16:38:39 -0500 asked a question catkin build run_tests stuck in a loop.

catkin build run_tests stuck in a loop. I've implemented the code from here in my own package without any modifications.

2018-05-03 16:54:17 -0500 received badge  Famous Question (source)
2017-07-26 01:36:34 -0500 received badge  Notable Question (source)
2017-02-21 09:51:08 -0500 received badge  Popular Question (source)
2017-01-20 22:48:02 -0500 received badge  Teacher (source)
2017-01-20 22:48:02 -0500 received badge  Necromancer (source)
2016-06-07 09:34:08 -0500 answered a question How to retrieve the quaternion in (x,y,z,w) format from tf

m_floats is a protected variable. In stead access x,y,z,w through quaternion.x() etcetera.

2016-05-26 11:51:43 -0500 asked a question rviz: cube_list cubes do not disappear

I'm using a cube list. The cubes are displayed correctly they however never disappear. I tried setting the lifetime but this had no effect. How can I fix this?

For code see below:

ros::Rate loop_rate(50);

visualization_msgs::MarkerArray obj_marker_array;

visualization_msgs::Marker obj_marker;
obj_marker.type = visualization_msgs::Marker::CUBE_LIST;
obj_marker.action = visualization_msgs::Marker::ADD;
obj_marker.ns = "cubes";
obj_marker.scale.x = 1;
obj_marker.scale.y = 1;
obj_marker.scale.z = 1;
obj_marker.header.frame_id = "/map"; // shoudl become wepod_base or the like
obj_marker.color.a = 1.0; // Don't forget to set the alpha!
obj_marker.color.r = 1.0;
obj_marker.id = 0;
ros::Duration lifetime;
obj_marker.lifetime = lifetime.fromSec(0.04); // lifetime of 40ms : 25Hz

while(ros::ok())
{
    for (int i=o; i<number_of_objects; i++)
    {
        geometry_msgs::Point obj;
        obj.x = obj_msg.objs_[i].x_;
        obj.y = obj_msg.objs_[i].y_;
        obj.z = 0;
        obj_marker.points.push_back(obj);
        // Adding a text object here
    }
    obj_marker.header.stamp = ros::Time::now();
    obj_marker_array.markers.push_back(obj_marker);

    obj_pub_.publish(obj_marker_array);

    loop_rate.sleep();
}
2016-02-17 04:52:08 -0500 received badge  Supporter (source)