There are several tutorials on MoveIt website on C++ API like [this one](http://docs.ros.org/kinetic/api/moveit_tutorials/html/doc/pr2_tutorials/planning/src/doc/move_group_interface_tutorial.html). I've downloaded them, built using `catkin build` and now can run those examples using `roslaunch`. But how exactly do I compile and run my own code? If I copy one of the example cpp-files to `${CATKIN_WS}/moveit_mycode/`, say `move_group_interface_tutorial.cpp`, edit a couple of lines, then what do I do next?
My take is that I shouldn't use `gcc` straightforwardly, but rather `catkin build`, which means I need a `CMakelists.txt` or something similar. Also, should I write a `.launch` file? I realize this is a very basic question, but I couldn't figure it out. I couldn't find any info on the topic, too, neither on MoveIt website nor anywhere else. I'd appreciate any help!
I'm on ROS Kinetic, Ubuntu 16.04.
↧
How to compile and run code written with MoveIt API?
↧
Can I build nodes in packages separately?
Can I build nodes in packages separately and use own CMakeLists for them?
One of my nodes can't use C++ 11, but other depends on it. Also I want to separate them to git-submodules.
↧
↧
Can we directly install ROS Kinetic packages on PC running Ubuntu 16.04 without installing ROS Kinetic on that PC ?
Hi,
I'm new to the ROS and Ubuntu world.While I was trying to install ROS Kinetic on PC running Ubuntu 16.04 a new question arose to my mind that "**whether it is always necessary to install first the ROS Kinetic on the PC running Ubuntu 16.04 or we can directly install ROS Kinetic packages like TurtleSim,Catkin,etc. on the PC using the command 'sudo apt-get install ros-kinetic-[PACKAGE_NAME]' without installing the ROS on PC(which will include some of the packages already in it)."**
And if it is possible to directly install packages on the PC running Ubuntu without completely installing ROS on PC,will we be able to used all the commands of the ROS like roscore,rosrun,rospack,source the environment,catkin,etc. in that PC.
Link:- http://wiki.ros.org/kinetic/Installation/Ubuntu
Any help in these question will be highly appreciated.
↧
move_base: does not publish/subscribe anything when roslaunch from local catkin workspace
Hello all. I'm having trouble getting my own local nodes (in a catkin workspace called arc_ws) to run with the navigation stack.
I have a slightly modified launch file from navigation_stage/launch. It looks as follows:
arc_ws/src/arc_navigation/launch/default.launch:
This is inside my local catkin workspace. If I run:
*source /opt/ros/kinetic/setup.bash*
and then roslaunch on this file, everything shows up fine
The problem, is that if I source my local catkin workspace, by doing:
"source arc_ws/devel/setup.bash"
, and then I launch this same launch file as before, suddenly the move_base node is **NOT** publishing/subscribing to anything that it should be (ex: costmap)
I'm using the navigation stack as part of a bigger project, so I need to be able to have a larger launch file such as this:
-->
The arc_behaviour, and arc_stage, are my own custom nodes, where as arc_navigation contains the launch file that launches the navigation stack/move_base.
**IN SUMMARY:**
If I source /opt/ros/kinetic/setup.bash, then I **can't load my local nodes arc_behaviour, and arc_stage**, because ROS_PACKAGE_PATH doesn't include my local directory....
BUT if I source my local workspace, then everything loads... but move_base doesn't seem to be publishing anything (ex: costmap data)...
Even if I manually export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:/pathtomyworkspace/arc_ws/src
move_base will still not publish/subscribe.... I can only get it to work if I explicitly source /opt/ros/kinetic/setup.bash, and ONLY that.
I've spent hours on this and can't figure out where I'm going wrong. It must be a namespace issue or something, but I can't figure out how to run both my local nodes and the ros move_base at the same time. Any guidance would be greatly appreciated, thanks all.
↧
dynamicEDTOctomap.h: No such file or directory
I installed dynamicedt3d library using sudo apt-get install ros-indigo-dynamicedt3d
Included in my CMakeLists as:> set(DYNAMICEDT3D_LIBRARIES "/opt/ros/indigo/lib/libdynamicedt3d.so")> include_directories( ${DYNAMICEDT3D_LIBRARIES} )> add_executable(get_occupancy src/get_occupancy.cpp)> target_link_libraries(get_occupancy $(DYNAMICEDT3D_LIBRARIES))
But while doing a catkin_make, I still get the error fatal error: dynamicEDTOctomap.h: No such file or directory
#include
Can somebody help me figure this out?
↧
↧
ROSserial trys to build all packages in catkin workspace
I have a simple catkin workspace with two packages:
gababot_core
jake
The gababot_core depends on ROSserial. The jake package does not. If I 'purge' my workspace and remove `build/` and `devel/` and then try to rebuild `catkin_make` it crashes with the following error:
*** Warning, failed to generate libraries for the following packages: ***
jake ('NoneType' object has no attribute '_md5sum')
Traceback (most recent call last):
File "/opt/ros/kinetic/share/rosserial_arduino/make_libraries.py", line 91, in
rosserial_generate(rospack, path+"/ros_lib", ROS_TO_EMBEDDED_TYPES)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosserial_client/make_library.py", line 561, in rosserial_generate
raise Exception("Failed to generate libraries for: " + str(failed))
Exception: Failed to generate libraries for: ["jake ('NoneType' object has no attribute '_md5sum')"]
gababot_core/CMakeFiles/gababot_core_ros_lib.dir/build.make:60: recipe for target 'gababot_core/ros_lib' failed
make[2]: *** [gababot_core/ros_lib] Error 1
CMakeFiles/Makefile2:1110: recipe for target 'gababot_core/CMakeFiles/gababot_core_ros_lib.dir/all' failed
make[1]: *** [gababot_core/CMakeFiles/gababot_core_ros_lib.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
So ROSserial tries to generate arduino libraries for jake. It doesn't make sense, because jake doesn't depend on ROSserial (esp. not rosserial_arduino). When I run `catkin_make` a second time it actually works fine and builds everything as I expect.
So why does ROSserial try to build libraries for all packages in my catkin folder instead of just the ones dependent on it? And how do I turn it off? :D
--Thanks
↧
What is the benefit of metapackages?
I can't figure out what is the benefit of using metapackages, as opposed to just putting stuff in different folders.
It seems metapackages can't be whitelisted or blacklisted, they cannot be used while defining dependencies of other catkin packages. They are not allowed to have common scripts for e.g. software delivery. It's just a package.xml and CMakeLists.txt.
So what's the point?
↧
How to subscribe to ros_arduino_msgs?
I'm using the ROSArduinoBridge to connect an ODROID to an Arduino and I'd like to subscribe to a digital sensor topic that the ROSArduinoBridge is publishing. I can't figure out the C++ syntax to be able to do this. Has anyone ever done this before and would be able to help me figure this out? I've checked the basic ROS Subscriber tutorials and tried to #include "ros_arduino_msgs/Digital.h", but the compiler says it can't find that file and I don't know what it should be. Any help would be appreciated, thanks!
↧
ROSberryPi - Install new packages
Hi all! I am not totally new to ROS,but it is the first time I use it on a Raspberry Pi.
I have a question regarding the installation of new packages on Rosberry Pi. Do I have to launch this command everytime I install a new package?
sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/indigo
Can't I just use catkin_make --pkg and compile just that new package? Cause this catkin_make_isolated takes a lot of time.
Moreover do I have to use that one also when I create a pkg by myself or can I just use catkin_make?
Thx!!
↧
↧
Compiler error when trying to migrate to catkin
I'm trying to port a previous project to catkin , which has been made in rosbuild. After rewriting the CMakeLists.txt I encounter the following compiler error:
crazyflie@crazyflie-ThinkPad-T550:~/catkin_ws$ catkin_make
Base path: /home/crazyflie/catkin_ws
Source space: /home/crazyflie/catkin_ws/src
Build space: /home/crazyflie/catkin_ws/build
Devel space: /home/crazyflie/catkin_ws/devel
Install space: /home/crazyflie/catkin_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/crazyflie/catkin_ws/build"
####
####
#### Running command: "make -j4 -l4" in "/home/crazyflie/catkin_ws/build"
####
[ 0%] Built target roscpp_generate_messages_nodejs
[ 0%] Built target std_msgs_generate_messages_py
[ 0%] Built target _crazypkg_generate_messages_check_deps_ViconData
[ 0%] Built target _crazypkg_generate_messages_check_deps_ControllerOutputPackage
[ 0%] Built target _crazypkg_generate_messages_check_deps_ControllerParam
[ 0%] Built target _crazypkg_generate_messages_check_deps_MotorCommands
[ 0%] Built target std_msgs_generate_messages_nodejs
[ 0%] Built target _crazypkg_generate_messages_check_deps_PositionSetpoint
[ 0%] Built target _crazypkg_generate_messages_check_deps_SampleTimeParam
[ 0%] Built target std_msgs_generate_messages_lisp
[ 0%] Built target std_msgs_generate_messages_eus
[ 0%] Built target std_msgs_generate_messages_cpp
[ 0%] Built target rosgraph_msgs_generate_messages_eus
[ 0%] Built target roscpp_generate_messages_py
[ 0%] Built target rosgraph_msgs_generate_messages_nodejs
[ 0%] Built target roscpp_generate_messages_cpp
[ 0%] Built target rosgraph_msgs_generate_messages_cpp
[ 0%] Built target roscpp_generate_messages_eus
[ 0%] Built target roscpp_generate_messages_lisp
[ 0%] Built target rosgraph_msgs_generate_messages_py
[ 0%] Built target rosgraph_msgs_generate_messages_lisp
[ 4%] Built target CrazyControllers
[ 6%] Building CXX object crazypkg/CMakeFiles/CrazyControl.dir/src/ControlManager.cpp.o
[ 21%] Built target crazypkg_generate_messages_py
[ 34%] Built target crazypkg_generate_messages_nodejs
[ 47%] Built target crazypkg_generate_messages_lisp
[ 60%] Built target crazypkg_generate_messages_cpp
[ 76%] Built target crazypkg_generate_messages_eus
[ 76%] Built target crazypkg_generate_messages
[ 80%] Built target ViconDataStreamSDK
[ 93%] Built target GUI
In file included from /opt/ros/kinetic/include/ros/serialization.h:37:0,
from /opt/ros/kinetic/include/ros/publisher.h:34,
from /opt/ros/kinetic/include/ros/node_handle.h:32,
from /opt/ros/kinetic/include/ros/ros.h:45,
from /home/crazyflie/catkin_ws/src/crazypkg/include/CrazyFlieInclude.h:5,
from /home/crazyflie/catkin_ws/src/crazypkg/src/ControlManager.cpp:1:
/opt/ros/kinetic/include/ros/message_traits.h: In instantiation of ‘static const char* ros::message_traits::MD5Sum::value(const M&) [with M = int]’:
/opt/ros/kinetic/include/ros/message_traits.h:255:102: required from ‘const char* ros::message_traits::md5sum(const M&) [with M = int]’
/opt/ros/kinetic/include/ros/publisher.h:112:7: required from ‘void ros::Publisher::publish(const M&) const [with M = int]’
/home/crazyflie/catkin_ws/src/crazypkg/src/ControlManager.cpp:518:69: required from here
/opt/ros/kinetic/include/ros/message_traits.h:126:34: error: request for member ‘__getMD5Sum’ in ‘m’, which is of non-class type ‘const int’
return m.__getMD5Sum().c_str();
^
/opt/ros/kinetic/include/ros/message_traits.h: In instantiation of ‘static const char* ros::message_traits::DataType::value(const M&) [with M = int]’:
/opt/ros/kinetic/include/ros/message_traits.h:264:104: required from ‘const char* ros::message_traits::datatype(const M&) [with M = int]’
/opt/ros/kinetic/include/ros/publisher.h:112:7: required from ‘void ros::Publisher::publish(const M&) const [with M = int]’
/home/crazyflie/catkin_ws/src/crazypkg/src/ControlManager.cpp:518:69: required from here
/opt/ros/kinetic/include/ros/message_traits.h:143:36: error: request for member ‘__getDataType’ in ‘m’, which is of non-class type ‘const int’
return m.__getDataType().c_str();
^
crazypkg/CMakeFiles/CrazyControl.dir/build.make:62: recipe for target 'crazypkg/CMakeFiles/CrazyControl.dir/src/ControlManager.cpp.o' failed
make[2]: *** [crazypkg/CMakeFiles/CrazyControl.dir/src/ControlManager.cpp.o] Error 1
CMakeFiles/Makefile2:614: recipe for target 'crazypkg/CMakeFiles/CrazyControl.dir/all' failed
make[1]: *** [crazypkg/CMakeFiles/CrazyControl.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j4 -l4" failed
This is the CMakeLists.txt:
cmake_minimum_required(VERSION 2.8.3)
project(crazypkg)
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
message_generation
)
find_package(
Qt5Widgets REQUIRED
Qt5Core REQUIRED
Qt5Gui REQUIRED
)
#-------------
set(CMAKE_INCLUDE_CURRENT_DIR ON)
#set the default path for built executables to the "bin" directory
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
#set the default path for built libraries to the "lib" directory
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
qt5_wrap_ui(UIS_HDRS gui/untitled/mainguiwindow.ui)
qt5_wrap_cpp(SRC_HDRS gui/untitled/mainguiwindow.h)
#-------------
add_message_files(FILES
ControllerOutputPackage.msg
MotorCommands.msg
SampleTimeParam.msg
ControllerParam.msg
PositionSetpoint.msg
ViconData.msg
)
generate_messages(DEPENDENCIES std_msgs)
catkin_package(
LIBRARIES
DEPENDS
)
include_directories(
${catkin_INCLUDE_DIRS}
include
)
#-------------
link_directories(${PROJECT_SOURCE_DIR}/src/ViconLibs)
#-------------
add_library(CrazyControl src/ControlManager.cpp)
add_library(CrazyControllers src/CrazyFlieControllers.cpp)
add_executable(ViconDataStreamSDK nodes/ViconDataStreamSDK.cpp)
add_executable(FlightControl nodes/FlightControl.cpp)
add_executable(GUI gui/untitled/mainguiwindow.cpp gui/untitled/main.cpp ${UIS_HDRS} ${SRC_HDRS})
add_dependencies(ViconDataStreamSDK ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} ${PROJECT_NAME}_generate_cpp_messages)
add_dependencies(FlightControl ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} ${PROJECT_NAME}_generate_cpp_messages)
add_dependencies(GUI ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} ${PROJECT_NAME}_generate_cpp_messages)
#-------------
qt5_use_modules(GUI Widgets)
#rosbuild_add_library(GUIMain gui/untitled/mainguiwindow.cpp)
target_link_libraries(FlightControl ${catkin_LIBRARIES})
target_link_libraries(FlightControl CrazyControl)
target_link_libraries(FlightControl CrazyControllers)
target_link_libraries(GUI ${catkin_LIBRARIES})
#target_link_libraries(GUI GUIMain)
target_link_libraries(GUI Qt5::Widgets)
#target_link_libraries(GUI CrazyControl)
#target_link_libraries(GUI CrazyControllers)
target_link_libraries(ViconDataStreamSDK ${catkin_LIBRARIES})
target_link_libraries(ViconDataStreamSDK libViconDataStreamSDK_CPP.so)
#-------------
And the package.xml:
crazypkg 0.0.0 The crazypkg package crazyflie TODO catkin roscpp rospy std_msgs roscpp rospy std_msgs
And some lines, that are part of the ControlManager.cpp. Including the erroneous line 518 at the end :
void CControlMgr::callbackViconData(const crazypkg::ViconData& msgViconData)
{
if(fabs(msgViconData.x)>0.00001 && fabs(msgViconData.y)>0.00001 && fabs(msgViconData.z)>0.00001)
{
m_ViconDataPrev=m_ViconData;
m_ViconData=msgViconData;
m_ViconData.x/=1000;
m_ViconData.y/=1000;
m_ViconData.z/=1000;
if(m_isCalibrating)
{
m_calCnt++;
m_calRollSum+=m_ViconData.roll;
m_calPitchSum+=m_ViconData.pitch;
}
m_ViconData.roll-=m_RollOffset;
m_ViconData.pitch-=m_PitchOffset;
m_derivativeEstimator->pushMeasurement(FullStateEstimation
(m_ViconData.acquiringTime, m_ViconData.x,m_ViconData.y,m_ViconData.z,
m_ViconData.yaw,m_ViconData.pitch,m_ViconData.roll));
m_SSKalmanEstimator->pushMeasurement(FullStateEstimation
(m_ViconData.acquiringTime, m_ViconData.x,m_ViconData.y,m_ViconData.z,
m_ViconData.yaw,m_ViconData.pitch,m_ViconData.roll));
m_fullStateEstimation=m_SSKalmanEstimator->estimateState();
m_derivativeEstimation=m_derivativeEstimator->estimateState();
if(m_pActiveCrazyController!=NULL)
{
m_pActiveCrazyController->setStateEstimation(m_fullStateEstimation);
m_pRateController->setStateEstimation(m_fullStateEstimation);
}
}
else
{
m_cntViconDataMissed++;
m_pPublisherCntViconDataMissed->publish(m_cntViconDataMissed); //Line 518!!
}
}
My guess is that somewhere in the CMakeLists.txt something is missing, but I can't find out what. All the project code compiled without errors on rosbuild, so it is correct.
Thank you very much for your help.
↧
Linking issues with catkin: undefined references
I've been trying to use a sound source localization library I've attempted to catkinize, but am hitting some linking issues and am not sure why. I've followed the auto generated cmake files and adapted it to accommodate for the MARS libraries' use of in source directory header files, but I feel I'm still missing something. The packages and commits in question:
* [mars](https://github.com/ruffsl/mars/tree/feb5c4fff3f0c16d623ac603b32bda450984a366) ([upstream fork](https://github.com/introlab/mars/tree/dev))
* [mars_ros](https://github.com/ruffsl/mars_ros/tree/e3ecd15c3daac49d1fb4c7c14607fc0d6bc6fe1e)
Here is the main error:
Starting >>> mars_ros
_______________________________________________________________________________
Errors << mars_ros:make /root/catkin_ws/logs/mars_ros/build.make.000.log
CMakeFiles/buf_test.dir/src/buf_test.cpp.o: In function `main':
buf_test.cpp:(.text.startup+0xf): undefined reference to `arguments_construct_null()'
buf_test.cpp:(.text.startup+0x1b): undefined reference to `parameters_construct_null()'
buf_test.cpp:(.text.startup+0x23): undefined reference to `configs_construct_null()'
buf_test.cpp:(.text.startup+0x2b): undefined reference to `objects_construct_null()'
buf_test.cpp:(.text.startup+0xd1): undefined reference to `file2parameters(parameters*, char const*)'
buf_test.cpp:(.text.startup+0x103): undefined reference to `parameters2configs(configs*, parameters const*)'
buf_test.cpp:(.text.startup+0x144): undefined reference to `configs2objects(objects*, configs const*, arguments const*)'
buf_test.cpp:(.text.startup+0x191): undefined reference to `objects2objects_process(objects*, profiler_obj*)'
buf_test.cpp:(.text.startup+0x1d7): undefined reference to `arguments_destroy(arguments*)'
buf_test.cpp:(.text.startup+0x1df): undefined reference to `parameters_destroy(parameters*)'
buf_test.cpp:(.text.startup+0x1e7): undefined reference to `configs_destroy(configs*)'
buf_test.cpp:(.text.startup+0x1ef): undefined reference to `objects_destroy(objects*)'
buf_test.cpp:(.text.startup+0x36b): undefined reference to `profiler_destroy(profiler_obj*)'
buf_test.cpp:(.text.startup+0x3b0): undefined reference to `tracks_printf(tracks_obj const*)'
collect2: error: ld returned 1 exit status
make[2]: *** [/root/catkin_ws/devel/.private/mars_ros/lib/mars_ros/buf_test] Error 1
make[1]: *** [CMakeFiles/buf_test.dir/all] Error 2
make: *** [all] Error 2
cd /root/catkin_ws/build/mars_ros; catkin build --get-env mars_ros | catkin env -si /usr/bin/make --jobserver-fds=6,7 -j; cd -
...............................................................................
Failed << mars_ros:make [ Exited with code 2 ]
Failed <<< mars_ros [ 1.6 seconds ]
[build] Summary: 2 of 3 packages succeeded.
[build] Ignored: None.
[build] Warnings: None.
[build] Abandoned: No packages were abandoned.
[build] Failed: 1 packages failed.
[build] Runtime: 5.6 seconds total.
[build] Note: Workspace packages have changed, please re-source setup files to use them.
The command '/bin/sh -c catkin config --extend /opt/ros/$ROS_DISTRO --cmake-args -DCMAKE_BUILD_TYPE=Release && catkin build' returned a non-zero code: 1
Makefile:13: recipe for target 'build' failed
make: *** [build] Error 1
Here is entire verbose [catkin build log](http://pastebin.com/jcE2pHL2).
And here is a dockerfile to reproduce the build error:
FROM ros:kinetic
# install deps
RUN apt-get -qq update && \
apt-get -qq install -y \
build-essential \
cmake \
git \
libasound2-dev \
libconfig++-dev \
libfftw3-dev \
python-catkin-tools && \
rm -rf /var/lib/apt/lists/*
# setup catkin workspace
ENV CATKIN_WS=/root/catkin_ws
RUN mkdir -p $CATKIN_WS/src
WORKDIR $CATKIN_WS/src
# clone source
RUN git clone https://github.com/ruffsl/mars.git && \
cd mars && \
git checkout feb5c4fff3f0c16d623ac603b32bda450984a366
RUN git clone https://github.com/ruffsl/mars_ros.git && \
cd mars_ros && \
git checkout e3ecd15c3daac49d1fb4c7c14607fc0d6bc6fe1e
# catkin build
WORKDIR $CATKIN_WS
ENV TERM xterm
ENV PYTHONIOENCODING UTF-8
RUN catkin config \
--extend /opt/ros/$ROS_DISTRO \
--cmake-args \
-DCMAKE_BUILD_TYPE=Release && \
catkin build --verbose
Also any recommendations for the CMakelists for either the library or node package would be welcome.
↧
Catkin: Building install space from prebuilt devel space
Hello,
I have a catkin/ros project with full install rules, and I use 'catkin build' to build the project. I am trying to make it so I can build the project in a normal devel/build space, and then generate an installer from those results, but I am having issues understanding how catkin wants me to do this.
Building with an install space enabled produces a correct installer. Unfortunately, enabling the install space requires rebuilding everything.
catkin clean #Start Fresh
catkin build #Build devel space
catkin config --install #Enable install space
catkin build #Fails saying it is necessary to clean first
catkin clean
catkin config --install #Already set above, just making it clear this is set.
catkin build #Correctly builds install space! But cleaning and rebuilding (with different compiler flags is not acceptable).
My current solution is
catkin clean #Start Fresh
catkin build #Build devel space
catkin build -j1 --make-args install #Necessary to make catkin/cmake not randomly crash
The j1 is there because without it, catkin has threading issues and fails randomly (likely because I am triggering the install rules without catkin knowing so it does not create the install locks). I am trying to figure out the RIGHT way to make an install from an already build project, but the documentation has not mentioned it, or is referring to very old versions of catkin that are no longer applicable.
Are there any documents or commands/arguments I should look into?
↧
installing my ros package
I have a python node that takes xbox 360 controller inputs and publishes to cmd_vel topic. This node works fine when the ROS master is running on my laptop.
The robot i've built has a raspberry pi on it which runs the ROS master, and I use my laptop to run RVIZ and the node mentioned above, communicating with the ROS master via wifi. The problem is that i cant run the node on my laptop with the ros master being on the pi.
The comms between the two computers works fine, installed nodes on either work fine. I.e RVIS runs happily on the laptop and i can rostopic echo stuff. But when i try and run the node that i made in the catkin_ws i get something along the lines of the following -
Unable to register with master node [http://192.168.0.101:11311/]: master may not be running yet. Will keep trying.
Every time i reboot my machine i need to source the bash file in devel or whichever one it is (ROS reminds me of a messy university dorm room sometimes), I think this is the problem, as if i try and run a preinstalled node like the teleop key, it can't talk to the ros master. But then if i source ~/.bashrc (which is done by default in every new terminal) it can't find my package, which has my joystick node in it.
My question is, how do i install this package onto my system, much in the same way apt-get does when you install a ros package that way? A google search makes me think rosinstall might be what im after, but trying to find meaningful documentation is like trying to boil water in a chocolate tea pot. As per with anything ROS related.
Cheers in advance.
↧
↧
reset CATKIN_WHITELIST_PACKAGES
I am building a subset of the packages in my catkin workspace using CATKIN_WHITELIST_PACKAGES. However, when I want to rebuild the whole workspace (without CATKIN_WHITELIST_PACKAGES set), it still only builds the whitelisted packages. I assumed that the whitelist is only temporary for each build, but it seems like it is globally stored. I couldn't find any documentation on it.
If I want to change the whitelist, the only thing I can do is to remove `build` and `devel`. Can anyone provide me with some more information about CATKIN_WHITELIST_PACKAGES, i.e. what exactly it does and where it is stored?
↧
How to edit/compile ROS source code
Good afternoon,
I am trying to encrypt ros logs for a project, I currently have jade installed and running on an ubuntu OS. I believe the files I need to edit are in the ros_comm packages (rosconsole and rosout cpp files) that I found on the ROS Core Stack Github page.My biggest hurdle right now that I am facing is that I am having difficulty setting up my environment that would let me compile the source code. If you know of any tutorials or information that would give me an idea of how to edit and compile sections of the source code it would be greatly appreciated.
Thank you for your time,
Tyler
↧
catkin_tools not finding new msg/srv?
When I add a new `.msg` (I confirmed for `.srv` as well) and running `catkin build`, the new file doesn't seem to be processed.
Is this expected, or is there a way to let it find new definition? This doesn't seem to be is also a case with `catkin_make`.
CWS_PROOV=/tmp/cws_proof
mkdir -p "$CWS_PROOV"/src
cd "$CWS_PROOV"/src
git clone git@github.com:130s/prooving_grounds.git <-- Merely beginner_tutorials with minor change
cd "$CWS_PROOV"
catkin b
ll ./devel/lib/python2.7/dist-packages/beginner_tutorials/msg
source devel/setup.bash
roscd beginner_tutorials/
echo "int64 num" > msg/Num4.msg
cd -
catkin b
ll ./devel/lib/python2.7/dist-packages/beginner_tutorials/msg
total 24K
drwxrwxr-x 2 rosnoodle rosnoodle 4.0K Mar 17 14:23 ./
drwxrwxr-x 3 rosnoodle rosnoodle 4.0K Mar 17 14:23 ../
lrwxrwxrwx 1 rosnoodle rosnoodle 111 Mar 17 14:23 __init__.py -> /tmp/cws_proof/devel/.private/beginner_tutorials/lib/python2.7/dist-packages/beginner_tutorials/msg/__init__.py
lrwxrwxrwx 1 rosnoodle rosnoodle 108 Mar 17 14:23 _Num2.py -> /tmp/cws_proof/devel/.private/beginner_tutorials/lib/python2.7/dist-packages/beginner_tutorials/msg/_Num2.py
lrwxrwxrwx 1 rosnoodle rosnoodle 108 Mar 17 14:23 _Num3.py -> /tmp/cws_proof/devel/.private/beginner_tutorials/lib/python2.7/dist-packages/beginner_tutorials/msg/_Num3.py
lrwxrwxrwx 1 rosnoodle rosnoodle 107 Mar 17 14:23 _Num.py -> /tmp/cws_proof/devel/.private/beginner_tutorials/lib/python2.7/dist-packages/beginner_tutorials/msg/_Num.py
ll /tmp/cws_proof/devel/.private/beginner_tutorials/lib/python2.7/dist-packages/beginner_tutorials/msg
(Num4 not found)
ll ./devel/share/gennodejs/ros/beginner_tutorials/msg
(Num4 not found)
ll ./devel/share/common-lisp/ros/beginner_tutorials/msg
(Num4 not found)
$ apt-cache policy python-catkin-tools|grep Inst
Installed: 0.4.4-1
To work this around I'm removing `build`, `devel` before building. After modifying `CMakeLists.txt` also works for me.
Seen on Xenial Kinetic and Trusty Indigo.
↧
ROS message subfolder
Hi,
I noticed that ROS does not correctly see message files in subfolders of the "msg" folder. The add_message_files command can take a DIRECTORY command which works partly:
add_message_files(
DIRECTORY
msg/subfolder1
FILES
testmessage.msg
)
Both `catkin_make_isolated` and `catkin build` run perfectly but after a `source devel/setup.bash`, the `rosmsg list` command does not show this testmessage. If I change the subfolder name to something different in the CMakeLists file, cmake complaints about the missing path. Hence, the folder path is recognized partly.
The only solution I found was to move all message files out of subfolders such they are directly placed at e.g., `msg/testmessage.msg`. Then, the `rosmsg list` command shows the message.
Is there another way to use subfolders for message definitions?
Thanks!
↧
↧
JetBrains CLion IDE setup for ROS
I've downloaded it a couple of days ago, but I still have not figure out how to configure it correctly to work with ROS.
If I import a simple ROS project it gives me the following error, but I can compile (and run) it from the terminal:
Error: By not providing "Findcatkin.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "catkin", but CMake did not find one.
Could not find a package configuration file provided by "catkin" with any of the following names:
catkinConfig.cmake catkin-config.cmake
Add the installation prefix of "catkin" to CMAKE_PREFIX_PATH or set "catkin_DIR" to a directory containing one of the above files. If "catkin" provides a separate development package or SDK, be sure it has been installed.
I'd like to know where to properly set these environmental variables and how can I get the equivalent of `catkin_make` from inside the IDE.
Thanks in advance!
↧
catkin cmake error with ros (error code 1)
Hello everyone, I am following the tutorial here to create a workspace with catkin: http://wiki.ros.org/catkin/Tutorials/create_a_workspace
When I invoke catkin_make, I get this output:
ertugrul@Ertugrul-Laptop:~/ros/workspace/tutorial$ catkin_make
Base path: /home/ertugrul/ros/workspace/tutorial
Source space: /home/ertugrul/ros/workspace/tutorial/src
Build space: /home/ertugrul/ros/workspace/tutorial/build
Devel space: /home/ertugrul/ros/workspace/tutorial/devel
Install space: /home/ertugrul/ros/workspace/tutorial/install
####
#### Running command: "cmake /home/ertugrul/ros/workspace/tutorial/src -DCATKIN_DEVEL_PREFIX=/home/ertugrul/ros/workspace/tutorial/devel -DCMAKE_INSTALL_PREFIX=/home/ertugrul/ros/workspace/tutorial/install -G Unix Makefiles" in "/home/ertugrul/ros/workspace/tutorial/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/ertugrul/ros/workspace/tutorial/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/kinetic
-- This workspace overlays: /opt/ros/kinetic
-- Using PYTHON_EXECUTABLE: /home/ertugrul/anaconda2/bin/python
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/ertugrul/ros/workspace/tutorial/build/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
Traceback (most recent call last):
File "/opt/ros/kinetic/share/catkin/cmake/parse_package_xml.py", line 107, in
main()
File "/opt/ros/kinetic/share/catkin/cmake/parse_package_xml.py", line 99, in main
package = parse_package(args.package_xml)
File "/home/ertugrul/anaconda2/lib/python2.7/site-packages/catkin_pkg/package.py", line 317, in parse_package
return parse_package_string(f.read(), filename)
File "/home/ertugrul/anaconda2/lib/python2.7/site-packages/catkin_pkg/package.py", line 450, in parse_package_string
raise InvalidPackage('Error(s) in %s:%s' % (filename, ''.join(['\n- %s' % e for e in errors])))
catkin_pkg.package.InvalidPackage: Invalid package manifest "/opt/ros/kinetic/share/catkin/cmake/../package.xml": Error(s) in /opt/ros/kinetic/share/catkin/cmake/../package.xml:
- The manifest must not contain the following tags: depend, build_export_depend, buildtool_export_depend
CMake Error at /opt/ros/kinetic/share/catkin/cmake/safe_execute_process.cmake:11 (message):
execute_process(/home/ertugrul/anaconda2/bin/python
"/opt/ros/kinetic/share/catkin/cmake/parse_package_xml.py"
"/opt/ros/kinetic/share/catkin/cmake/../package.xml"
"/home/ertugrul/ros/workspace/tutorial/build/catkin/catkin_generated/version/package.cmake")
returned error code 1
Call Stack (most recent call first):
/opt/ros/kinetic/share/catkin/cmake/catkin_package_xml.cmake:63 (safe_execute_process)
/opt/ros/kinetic/share/catkin/cmake/all.cmake:151 (_catkin_package_xml)
/opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:20 (include)
CMakeLists.txt:52 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/ertugrul/ros/workspace/tutorial/build/CMakeFiles/CMakeOutput.log".
See also "/home/ertugrul/ros/workspace/tutorial/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed
I have tried anything I could find online, but I'm now clueless. Thank you for any help!
↧
Why run catkin_init_workspace inside src folder?
I don't unstand why we run catkin_init_workspace inside the src folder, shoudn't it be the root folder, which is the catkin workspace folder?
$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws/src
$ catkin_init_workspace
↧