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

cmorgan's profile - activity

2023-03-29 11:31:05 -0500 received badge  Famous Question (source)
2022-02-13 01:05:16 -0500 received badge  Nice Question (source)
2022-02-11 01:54:17 -0500 marked best answer ros2 how to get non-ros parameter argument count

I have code like:

int main(...)
{
   rclcpp::init(argc, argv);

   if(argc != 3) {
      printf("Error, missing arguments for a, b\n");
 }
...

The problem with this is that when using launch_testing.launch_test, or any launch file and specifying arguments for my application, these tools/libraries are adding extra parameters like:

mcu_sim_test 20 -50 --ros-args -r __node:=test -r __ns:=/mcu_sim_namespace

These additional --ros-args are throwing off the argument counts even though they aren't being used by my package but rather used by ros2.

I did see that this is an intentional change from ros1 where the argc/argv were being altered and that makes a ton of sense. Where I'm stuck is how to address it.

2022-02-10 22:20:23 -0500 received badge  Student (source)
2022-02-10 22:04:55 -0500 received badge  Notable Question (source)
2021-01-22 05:34:56 -0500 received badge  Notable Question (source)
2020-12-16 14:25:50 -0500 received badge  Popular Question (source)
2020-08-06 14:47:15 -0500 received badge  Famous Question (source)
2020-06-12 09:00:38 -0500 received badge  Popular Question (source)
2020-06-03 10:47:28 -0500 received badge  Famous Question (source)
2020-04-21 16:53:09 -0500 asked a question How does micro-ros resync their nuttx fork with mainline?

How does micro-ros resync their nuttx fork with mainline? We are looking at using micro-ros and I was trying to build co

2020-04-20 16:52:50 -0500 received badge  Notable Question (source)
2020-04-20 11:42:52 -0500 marked best answer ros2 osrf docker container fails to build

Hello. I'm trying to build a dockerfile that extends the ones osrf is providing at https://hub.docker.com/r/osrf/ros2 and builds our company robot software. This is a first step towards setting up a CI system with jenkins and to simplify building for people that may not have the ros2 toolchain built and installed (maybe we can move to using a container vs. installing locally like we do now).

I've been having some issues with the build and put together two example projects that I can share that build with my local ros2 foxy install but won't build in the container.

The osrf/ros2:nightly is from yesterday.

The dockerfile is inline (because I can't attach it as I have less than 5 points...):

FROM osrf/ros2:nightly

# we want to be able to source
SHELL ["/bin/bash", "-c"]

# Install git
RUN apt-get update && \
    apt-get install -y git

# clone the test repos
RUN cd /root && mkdir -p ros2_workspace/src && \
    cd ros2_workspace/src && \
    git clone https://github.com/cmorganBE/ros2_server_example.git && \
    git clone https://github.com/cmorganBE/ros2_idl_example.git && \
    cd ros2_idl_example && git checkout 7091c75045f26d

# build the workspace
RUN cd /root/ros2_workspace && \
    source /opt/ros/foxy/setup.bash && \
    colcon build --symlink-install

CMD ["bash"]

I'm not planning or using the connext dds implementation but it looks like somehow this build expects it, although there aren't any errors about missing tools to generate the idl libraries either....

The output from the failed build is:

...
Removing intermediate container 904c18a2ae5a
 ---> fc53bea5cc02
Step 5/6 : RUN cd /root/ros2_workspace &&     source /opt/ros/foxy/setup.bash &&     colcon build --symlink-install
 ---> Running in 0f75521896ba
[connext_cmake_module] Warning: The location at which Connext was found when the workspace was built [[/opt/rti.com/rti_connext_dds-5.3.1]] does not point to a valid directory, and the NDDSHOME environment variable has not been set. Support for Connext will not be available.
Starting >>> ros2_idl_example
--- stderr: ros2_idl_example
CMake Error at /opt/ros/foxy/share/rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake:276 (add_dependencies):
  The dependency target "ros2_idl_example__rosidl_typesupport_connext_c" of
  target "ros2_idl_example__rosidl_typesupport_connext_c__pyext" does not
  exist.
Call Stack (most recent call first):
  /opt/ros/foxy/share/ament_cmake_core/cmake/core/ament_execute_extensions.cmake:48 (include)
  /opt/ros/foxy/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:286 (ament_execute_extensions)
  CMakeLists.txt:26 (rosidl_generate_interfaces)


CMake Generate step failed.  Build files cannot be regenerated correctly.
---
Failed   <<< ros2_idl_example   [ Exited with code 1 ]

Summary: 0 packages finished [1.91s]
  1 package failed: ros2_idl_example
  1 package had stderr output: ros2_idl_example
  1 package not processed
The command '/bin/bash -c cd /root/ros2_workspace &&     source /opt/ros/foxy/setup.bash &&     colcon build --symlink-install' returned a non-zero code: 1
cmorgan@cmorgan-bec:~/projects/ros2_docker/publictest$
2020-04-20 11:42:48 -0500 commented answer ros2 osrf docker container fails to build

@marguedas I can confirm that it does work correctly now, thank you for opening a ticket and to Dirk for fixing it!

2020-04-17 14:59:39 -0500 received badge  Popular Question (source)
2020-04-16 07:09:58 -0500 asked a question ros2 osrf docker container fails to build

ros2 osrf docker container fails to build Hello. I'm trying to build a dockerfile that extends the ones osrf is providin

2020-04-08 11:46:07 -0500 commented question ros2 cli arguments distinguishing from ros arguments

The forum didn't give any indication that the post was created after logging in and instead brought me to a change passw

2020-04-08 11:03:04 -0500 edited question ros2 cli arguments distinguishing from ros arguments

ros2 cli arguments I have a cpp package like: int main(...) { rclcpp::init(argc, argv); if(argc != 3) { pr

2020-04-08 11:03:04 -0500 received badge  Editor (source)
2020-04-08 11:02:41 -0500 asked a question ros2 cli arguments distinguishing from ros arguments

ros2 cli arguments I have a cpp package like: int main(...) { rclcpp::init(argc, argv); if(argc != 3) { pr

2020-04-08 11:01:47 -0500 asked a question ros2 how to get non-ros parameter argument count

ros2 how to get non-ros parameter argument count I have code like: int main(...) { rclcpp::init(argc, argv); if(

2020-04-03 07:35:13 -0500 received badge  Enthusiast
2020-03-25 12:59:51 -0500 marked best answer Guide for managing ros2 project in git

This question from 2017 asks the same question, https://answers.ros.org/question/2646..., but I thought things may have changed since then.

Our use case is likely typical:

  • Using git (through self hosted bitbucket)
  • Ros2 (foxy), on 20.04 (project is a few years in duration so we are ok with being slightly unstable right now)
  • We'll have a number of packages providing publishing for sensors and robot logic

From the documentation on setting up a workspace (https://index.ros.org/doc/ros2/Tutori...) it looks like the foxy build/install in ~/ros2_foxy would be our workspace.

Is it typical to consider a robots custom packages/applications etc as an overlay? Eg. would/should we track our overlay in git?

2020-03-25 12:59:51 -0500 received badge  Scholar (source)
2020-03-25 12:59:46 -0500 received badge  Supporter (source)
2020-03-25 12:58:50 -0500 received badge  Notable Question (source)
2020-03-25 00:00:47 -0500 received badge  Popular Question (source)
2020-03-24 15:48:44 -0500 commented answer Guide for managing ros2 project in git

Hi @tfoote. I'll have to try out the overlay option I guess to learn more about what it means to build a package for ros

2020-03-24 15:46:30 -0500 edited question Guide for managing ros2 project in git

Guide for managing ros2 project in git This question from 2017 asks the same question, https://answers.ros.org/question/

2020-03-24 15:12:18 -0500 commented answer Guide for managing ros2 project in git

Hi! What would we track in git in that case? A .repo file like the ros2.repo but with our packages and put all of that i

2020-03-24 14:44:04 -0500 asked a question Guide for managing ros2 project in git

Guide for managing ros2 project in git This question from 2017 asks the same question, https://answers.ros.org/question/