Trouble building rosserial_windows library from source
Hi,
I am I'm pretty new to ROS and trying to build the rosserial_windows library to create a ros publisher node in my c++ project.
I am attempting to follow this tutorial, but I can't use the instructions:
sudo apt-get install ros-hydro-rosserial-windows
sudo apt-get install ros-hydro-rosserial-server
because I'm using ros-for-windows
I tried the instruction from ms-iot consuming a ROS package
choco install ros-melodic-rosserial-windows
but that package doesn't exist. Trying the next step:
rosinstall_generator rosserial_windows --deps --exclude RPP --tar --flat > pkg.rosinstall
rosinstall_generator rosserial_server --deps --exclude RPP --tar --flat > pkg.rosinstall
wstool init src
wstool merge -r -y -t src pkg.rosinstall
wstool update -t src
rosdep update
rosdep install --from-paths src --ignore-src -r -y
catkin_make
The catkin_make threw an error
C:\opt\~\src\rosserial_server\include\rosserial_server/topic_handlers.h(40): fatal error C1083: Cannot open include file: 'rosserial_msgs/RequestMessageInfo.h': No such file or directory
In the "ros\melodic\x64\include\rosserial_msgs" there is no "RequestMessageInfo.h"
Okay different tact, new workspace, I cloned the rosserial repository.
git clone -b melodic-devel https://github.com/ros-drivers/rosserial.git
catkin_make
catkin_make install
works fine.
side note: I compared the cloned "rosserial_server/topic_handlers.h" with the rosinstall_generator "rosserial_server/topic_handlers.h" and the cloned one didn't include RequestMessageInfo.h
back to the original tutorial:
devel\setup.bat
rosrun rosserial_windows make_libraries.py my_library
[rosrun] Couldn't find executable named make_libraries.py
This seems to be an issue with "rosserial_windows"'s CMakeList.txt not pointing to the correct "make_libraries.py" path but as far as I can tell, which isn't very far, it is pointing to it
cmake_minimum_required(VERSION 2.8.3)
project(rosserial_windows)
find_package(catkin REQUIRED COMPONENTS
geometry_msgs
nav_msgs
rosserial_client
sensor_msgs
std_msgs
)
catkin_package(CATKIN_DEPENDS)
install(
DIRECTORY src/ros_lib
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/src
)
catkin_install_python(
PROGRAMS src/${PROJECT_NAME}/make_libraries.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
- the path to the "rosserial_windows" package is:
<catkin workspace>\src\rosserial\rosserial_windows
-the path to "make_libraries.py" is:
<catkin workspace>\src\rosserial\rosserial_windows\src\rosserial_windows\make_libraries.py
I'm very confused, I've just spent the last 7 hours trying to build a library ;~;
What's the blatantly obvious thing I've missed?