Ask Your Question

otamachan's profile - activity

2019-04-19 19:13:44 -0500 received badge  Good Answer (source)
2017-12-25 16:05:26 -0500 received badge  Nice Answer (source)
2017-12-25 02:17:11 -0500 received badge  Necromancer (source)
2017-02-20 08:23:35 -0500 received badge  Famous Question (source)
2017-02-01 08:12:52 -0500 answered a question rostest & Python - Multiple Test Fixtures In Single File

It seems that this was solved in Kinetic. I can run multiple test fixtures in a single file with the following code.

if __name__ == '__main__':
    import rostest
    rostest.rosrun('my_package', 'my_test', __name__, sys.argv)
2017-01-31 09:17:42 -0500 received badge  Nice Answer (source)
2017-01-13 08:07:53 -0500 received badge  Teacher (source)
2017-01-13 08:07:53 -0500 received badge  Necromancer (source)
2016-11-21 05:19:54 -0500 received badge  Notable Question (source)
2016-11-20 01:23:54 -0500 received badge  Enthusiast
2016-11-19 14:48:18 -0500 received badge  Good Question (source)
2016-11-19 03:53:42 -0500 received badge  Popular Question (source)
2016-11-19 03:04:34 -0500 received badge  Nice Question (source)
2016-11-18 18:57:46 -0500 received badge  Student (source)
2016-11-18 17:15:58 -0500 asked a question ROS_IP and ROS_HOSTNAME

Hello,

In my understanding according to the wiki, ROS_IP is for the IP address of the host machine where a ROS node runs and ROS_HOSTNAME is for a resolvable host name. But I'm confused because an IP address is also a resolvable name(maybe resolved name?). So even when I set an IP address to ROS_HOSTNAME, everything works well.

I saw the source codes and found that both are treated almost same(rocpp, rospy).

So my questions are

  1. Why are there two environmental variablesROS_IP and ROS_HOSTNAME, even though both are treated almost same?
  2. Is it better to always use ROS_HOSTNAME to avoid network troubles? I've seen some people have troubles because they set both variables and ROS_IP doesn't work as they expected.

Thanks in advance.

2015-12-15 06:53:17 -0500 received badge  Supporter (source)
2015-11-18 08:43:38 -0500 answered a question Catkin Doesn't Play Nice With Google Mock

I build gmock manually and replace GTEST_LIBRARIES after find_package(catkin). This is not clean solution but it works in Ubuntu 14.04 and Indigo.

find_package(catkin REQUIRED)
...
# Build gmock
set(gmock_SOURCE_DIR /usr/src/gmock)
include_directories(${gmock_SOURCE_DIR}/include
                    ${gmock_SOURCE_DIR}
                    ${gmock_SOURCE_DIR}/gtest/include
                    ${gmock_SOURCE_DIR}/gtest)
add_library(gmock
            ${gmock_SOURCE_DIR}/gtest/src/gtest-all.cc
            ${gmock_SOURCE_DIR}/src/gmock-all.cc)
target_link_libraries(gmock pthread)
# Replace catkin variable
set(GTEST_LIBRARIES gmock)
...
catkin_add_gtest(${PROJECT_NAME}-test test/test_sample.cpp)