###
[ security.md ](/IntelRealSense/realsense-
ros/blob/ros2-development/security.md "security.md")
|
###
[ security.md ](/IntelRealSense/realsense-
ros/blob/ros2-development/security.md "security.md")
|
|

View all files

##  Repository files navigation
  * README
  * Apache-2.0 license
  * Security
#  [ ![Intel®
RealSense™](https://camo.githubusercontent.com/ac9979d7a35a6fc410557aa953e4aaa5dbc63169bf23e3b704d9fb383e702056/68747470733a2f2f7777772e696e74656c7265616c73656e73652e636f6d2f77702d636f6e74656e742f75706c6f6164732f323032302f30392f696e74656c2d7265616c73656e73652d6c6f676f2d33363070782e706e67)
](https://camo.githubusercontent.com/ac9979d7a35a6fc410557aa953e4aaa5dbc63169bf23e3b704d9fb383e702056/68747470733a2f2f7777772e696e74656c7265616c73656e73652e636f6d2f77702d636f6e74656e742f75706c6f6164732f323032302f30392f696e74656c2d7265616c73656e73652d6c6f676f2d33363070782e706e67)
ROS Wrapper for Intel(R) RealSense(TM) Cameras
[ Latest release notes ](https://github.com/IntelRealSense/realsense-
ros/releases)
* * *
[
![rolling](https://camo.githubusercontent.com/77c8a2e7c1b0d65bdc7e3e518f15d15d0257d54a178b76318fc5897d727fe49f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d524f4c4c494e472d6f72616e67653f7374796c653d666c61742d737175617265266c6f676f3d726f73)
](https://docs.ros.org/en/rolling/index.html) [
![iron](https://camo.githubusercontent.com/78b7d531541efcb886be277f905201b71581dfe49b3f4f7aca8c9dc70d276575/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d49524f4e2d6f72616e67653f7374796c653d666c61742d737175617265266c6f676f3d726f73)
](https://docs.ros.org/en/iron/index.html) [
![humble](https://camo.githubusercontent.com/3c88b808873de4dcebe9a2fe5fdd4ace4557c834c03e525fb288a16d68cbea3b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d48554d424c452d6f72616e67653f7374796c653d666c61742d737175617265266c6f676f3d726f73)
](https://docs.ros.org/en/humble/index.html) [
![foxy](https://camo.githubusercontent.com/49ec5e5b3b3fd8f69f97d85adac5a39acd10c1269f12e158210ba66688086d2c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d666f78792d6f72616e67653f7374796c653d666c61742d737175617265266c6f676f3d726f73)
](https://docs.ros.org/en/foxy/index.html) [
![ubuntu22](https://camo.githubusercontent.com/b2ca3492b71a4457eaaec9612208662fc8affada8cc5cfd7adc880f6230164ba/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d5542554e5455253230323225324530342d626c75653f7374796c653d666c61742d737175617265266c6f676f3d7562756e7475266c6f676f436f6c6f723d7768697465)
](https://releases.ubuntu.com/jammy/) [
![ubuntu20](https://camo.githubusercontent.com/8a3efe550f59ccda9b86f693e71cc54334dc08ca6371620c8427a2812d5ccee8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d5542554e5455253230323025324530342d626c75653f7374796c653d666c61742d737175617265266c6f676f3d7562756e7475266c6f676f436f6c6f723d7768697465)
](https://releases.ubuntu.com/focal/)
[
![GitHubWorkflowStatus](https://camo.githubusercontent.com/d8d75d8c5205b63ef37bf40d74fb9b55c27f6d731fed5a6b386da92dd0612a52/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f496e74656c5265616c53656e73652f7265616c73656e73652d726f732f6d61696e2e796d6c3f6c6f676f3d676974687562267374796c653d666c61742d737175617265)
](https://camo.githubusercontent.com/d8d75d8c5205b63ef37bf40d74fb9b55c27f6d731fed5a6b386da92dd0612a52/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f496e74656c5265616c53656e73652f7265616c73656e73652d726f732f6d61696e2e796d6c3f6c6f676f3d676974687562267374796c653d666c61742d737175617265)


1
Mar 18 '23
@hemals
Will Elbrus work with intel d457camera ?
will https://docs.nvidia.com/isaac/archive/2020.2/packages/visual_slam/doc/visual_odometry.html work with intel realsense d457?
created separate thread at https://forums.developer.nvidia.com/t/is-there-intel-realsense-d457-support-for-vslam/246608


[ ![@MartyG-
RealSense](https://avatars.githubusercontent.com/u/41145062?s=80&v=4)
](/MartyG-RealSense)


Sorry, something went wrong.


Sign up for GitHub


I'm using CMake version 3.22.1, I'll try installing a newer one and doing
everything again. Thank you!

---

All reactions


But I'm using a 12GB swapfile

---

All reactions


` ros2 run realsense2_camera realsense2_camera_node `


Looks like you are enjoying the discussion, why not join the community?
By becoming a member you can be part of the conversation and start new ones. Get notifications and follow topics and tags, upvote and so much more. In the process you can join the NVIDIA Developer Program and get access to the latest SDKs, tools and training materials.


No milestone


Collaborator


[
![@jesusramondovale](https://avatars.githubusercontent.com/u/71335809?s=80&u=685a941db48e06cf9755dda201d84325d3088551&v=4)
](/jesusramondovale)


Development


2 months later


By clicking “Sign up for GitHub”, you agree to our [ terms of service
](https://docs.github.com/terms) and [ privacy statement
](https://docs.github.com/privacy) . We’ll occasionally send you account
related emails.


Hey. I've got the exact same problem again...
Installed RealSense SDK succesfully (sudo rs-enumerate-devices works fine)
but when I execute the ROS2 Wrapper with


[ http://www.polyhex.net/product/embedded-motherboard/board/nxp.html?id=483
](http://www.polyhex.net/product/embedded-motherboard/board/nxp.html?id=483)


* Solutions


Pick a username


1. First, set up the Ubuntu repositories using the instructions at the link below.


**[ MartyG-RealSense ](/MartyG-RealSense) ** commented  Jul 24, 2023  •


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.


Case closed due to no further comments received.

---

All reactions


I'm going to re-isntall the Debix's Ubuntu Image from zero, and then re-do all
the steps you mention. I'll keep you updated, thank you so much.


Sorry, something went wrong.


3. Open a second new terminal window with Ctrl - Alt - T.


Copy link


Author


What happens if you launch with **ros2 launch** instead of ros2 run?


All reactions


I receive the following error while executing:


[ WARNING : (d400-factory.cpp:1195) DS5 group_devices is empty.
IntelRealSense/librealsense#12047
](/IntelRealSense/librealsense/issues/12047)


[ ](https://github.com/)


I note that you have had previous issues with Debix at [ #2694
](https://github.com/IntelRealSense/realsense-ros/issues/2694)

---

All reactions


GPU: GTX1060M
CUDA 11.8
CUDNN 8.7
CPU: Intel i7, 7th Gen
OS: Ubuntu 22.04LTS
ROS2: Humble


` ros2 run realsense2_camera realsense2_camera_node --ros-args -p
enable_color:=false -p spatial_filter.enable:=true -p
temporal_filter.enable:=true `

---

All reactions


Jump to bottom


New issue


thanosrom95
May 14
please share the complete failure for checking.


> No, you would not need to execute it from an exact folder. ROS commands such
> as this should be input into the ROS terminal window and not an Ubuntu
> terminal window.


[
![@jesusramondovale](https://avatars.githubusercontent.com/u/71335809?s=80&u=685a941db48e06cf9755dda201d84325d3088551&v=4)
](/jesusramondovale)


#  Saved searches


Sorry, something went wrong.


` ros2 launch realsense2_camera rs_launch.py `


For


* [ GitHub Sponsors  Fund open source developers  ](/sponsors)


Resources


[ ![@MartyG-
RealSense](https://avatars.githubusercontent.com/u/41145062?s=80&v=4)
](/MartyG-RealSense)


Password


No one assigned


**[ MartyG-RealSense ](/MartyG-RealSense) ** commented  Jul 20, 2023


[ Sign in
](/login?return_to=https%3A%2F%2Fgithub.com%2FIntelRealSense%2Frealsense-
ros%2Fissues%2F2816)


2
May 10
Hi all im trying to install my camera with orin nx ,i have been trying this for like 2-3 days !


Skip to content


Copy link


[ ![@MartyG-
RealSense](https://avatars.githubusercontent.com/u/41145062?s=40&v=4)
](/MartyG-RealSense) [ MartyG-RealSense ](/MartyG-RealSense) added the [
question ](/IntelRealSense/realsense-ros/labels/question) label  Jul 18, 2023


Added "set(CMAKE_CXX_STANDARD 14)" at line 1 of CMakeLists.txt and
CMake/lrs_macros.cmake files but nothing changed (same error output)

---

All reactions


edited


Looks like you are enjoying the discussion, why not join the community?
By becoming a member you can be part of the conversation and start new ones. Get notifications and follow topics and tags, upvote and so much more. In the process you can join the NVIDIA Developer Program and get access to the latest SDKs, tools and training materials.


> What happens if you launch with **ros2 launch** instead of ros2 run?
>
> ` ros2 launch realsense2_camera rs_launch.py enable_color:=false
> spatial_filter.enable:=true temporal_filter.enable:=true `


Labels


This command needs to be entered every time that you are starting a new ROS2
session.


Sincerely,
Tse


Sorry, something went wrong.


**[ MartyG-RealSense ](/MartyG-RealSense) ** commented  Jul 24, 2023


* Open Source


Sign Up
Maybe later


**Have a question about this project?** Sign up for a free GitHub account to
open an issue and contact its maintainers and the community.


You signed in with another tab or window. [ Reload ]() to refresh your
session.  You signed out in another tab or window. [ Reload ]() to refresh
your session.  You switched accounts on another tab or window. [ Reload ]() to
refresh your session.  Dismiss alert


  * ` align_depth ` : If enabled, will publish the depth image aligned to the color image on the topic ` /camera/camera/aligned_depth_to_color/image_raw ` .
    * The pointcloud, if created, will be based on the aligned depth image.
  * ` colorizer ` : will color the depth image. On the depth topic an RGB image will be published, instead of the 16bit depth values .
  * ` pointcloud ` : will add a pointcloud topic ` /camera/camera/depth/color/points ` .
    * The texture of the pointcloud can be modified using the ` pointcloud.stream_filter ` parameter.
    * The depth FOV and the texture FOV are not similar. By default, pointcloud is limited to the section of depth containing the texture. You can have a full depth to pointcloud, coloring the regions beyond the texture with zeros, by setting ` pointcloud.allow_no_texture_points ` to true.
    * pointcloud is of an unordered format by default. This can be changed by setting ` pointcloud.ordered_pc ` to true.
    * The QoS of the pointcloud topic is independent from depth and color streams and can be controlled with the ` pointcloud.pointcloud_qos ` parameter.
      * The same set of QoS values are supported as other streams, refer to <stream_type>_qos in the Parameters section of this page.
      * The launch file should include the parameter with initial QoS value, for example, ` {'name': 'pointcloud.pointcloud_qos', 'default': 'SENSOR_DATA', 'description': 'pointcloud qos'} `
      * The QoS value can also be overridden at launch with command option, for example, ` pointcloud.pointcloud_qos:=SENSOR_DATA `
      * At runtime, the QoS can be changed dynamically but require the filter re-enable for the change to take effect, for example,

                        ros2 param set /camera/camera pointcloud.pointcloud_qos SENSOR_DATA
            ros2 param set /camera/camera pointcloud.enable false
            ros2 param set /camera/camera pointcloud.enable true
  * ` hdr_merge ` : Allows depth image to be created by merging the information from 2 consecutive frames, taken with different exposure and gain values.
  * ` depth_module.hdr_enabled ` : to enable/disable HDR. The way to set exposure and gain values for each sequence:
    * during Runtime:
      * is by first selecting the sequence id, using the ` depth_module.sequence_id ` parameter and then modifying the ` depth_module.gain ` , and ` depth_module.exposure ` .
      * From FW versions 5.14.x.x and above, if HDR is enabled, the preset configs (like exposure, gain, etc.,) cannot be updated.
        * Disable the HDR first using ` depth_module.hdr_enabled ` parameter and then, update the required presets.
    * during Launch time of the node:
      * is by setting below parameters
        * ` depth_module.exposure.1 `
        * ` depth_module.gain.1 `
        * ` depth_module.exposure.2 `
        * ` depth_module.gain.2 `
      * Make sure to set ` depth_module.hdr_enabled ` to true, otherwise these parameters won't be considered.
    * To view the effect on the infrared image for each sequence id use the ` filter_by_sequence_id.sequence_id ` parameter.
    * For in-depth review of the subject please read the accompanying [ white paper ](https://dev.intelrealsense.com/docs/high-dynamic-range-with-stereoscopic-depth-cameras) .
    * **Note** : Auto exposure functionality is not supported when HDR is enabled. i.e., Auto exposure will be auto-disabled if HDR is enabled.
  * The following filters have detailed descriptions in : [ https://github.com/IntelRealSense/librealsense/blob/master/doc/post-processing-filters.md ](https://github.com/IntelRealSense/librealsense/blob/master/doc/post-processing-filters.md)
    * ` disparity_filter ` \- convert depth to disparity before applying other filters and back.
    * ` spatial_filter ` \- filter the depth image spatially.
    * ` temporal_filter ` \- filter the depth image temporally.
    * ` hole_filling_filter ` \- apply hole-filling filter.
    * ` decimation_filter ` \- reduces depth scene complexity.
Each of the above filters have it's own parameters, following the naming
convention of ` <filter_name>.<parameter_name> ` including a `


##  Use saved searches to filter your results more quickly


Also, on a RealSense ROS2 wrapper launch log, a log location is provided at
the top of the launch log on the line **All log files can be found below** ,
followed by the log path for your particular computer. You would need to use `
ros2 launch ` instead of ros2 run to see this log.

---

All reactions


**[ jesusramondovale ](/jesusramondovale) ** commented  Jul 24, 2023


Author


Copy link


Thanks in advance!


Could not create device - xioctl(VIDIOC_S_EXT_CTRLS) failed Last Error:
Invalid argument . Check SDK logs for details
Segmentation fault (core dumped)


edited


    * [ Enterprise ](/enterprise)
    * [ Teams ](/team)
    * [ Startups ](/enterprise/startups)
    * [ Education  ](https://education.github.com)


    ros2 run realsense2_camera realsense2_camera_node
    # or, with parameters, for example - temporal and spatial filters are enabled:
    ros2 run realsense2_camera realsense2_camera_node --ros-args -p enable_color:=false -p spatial_filter.enable:=true -p temporal_filter.enable:=true

####  with ros2 launch:

    ros2 launch realsense2_camera rs_launch.py
    ros2 launch realsense2_camera rs_launch.py depth_module.depth_profile:=1280x720x30 pointcloud.enable:=true

* * *
##  Camera Name And Camera Namespace
User can set the camera name and camera namespace, to distinguish between
cameras and platforms, which helps identifying the right nodes and topics to
work with.
###  Example
  * If user have multiple cameras (might be of the same model) and multiple robots then user can choose to launch/run his nodes on this way.
  * For the first robot and first camera he will run/launch it with these parameters:
    * camera_namespace:
      * robot1
    * camera_name
      * D455_1
    * With ros2 launch (via command line or by editing these two parameters in the launch file):
` ros2 launch realsense2_camera rs_launch.py camera_namespace:=robot1
camera_name:=D455_1 `
    * With ros2 run (using remapping mechanisim [ Reference ](https://docs.ros.org/en/humble/How-To-Guides/Node-arguments.html) ):
` ros2 run realsense2_camera realsense2_camera_node --ros-args -r
__node:=D455_1 -r __ns:=robot1 `
    * Result

        > ros2 node list
    /robot1/D455_1

    > ros2 topic list
    /robot1/D455_1/color/camera_info
    /robot1/D455_1/color/image_raw
    /robot1/D455_1/color/metadata
    /robot1/D455_1/depth/camera_info
    /robot1/D455_1/depth/image_rect_raw
    /robot1/D455_1/depth/metadata


2. In the new terminal, input **roscore** to launch the 'ROS Master'.


I've used the method number 1: install with apt-get, but.. the Linux Image
that I'm using is not the "original" Ubuntu 22.04, it's the DEBIX image they
provide at [ https://debix.io/Software/download.html
](https://debix.io/Software/download.html) (Ubuntu 22.04 - Model A&B) ... soo
I don't know exactly if I must repatch the kernel ...


Sorry, something went wrong.


[
![@jesusramondovale](https://avatars.githubusercontent.com/u/71335809?s=80&u=685a941db48e06cf9755dda201d84325d3088551&v=4)
](/jesusramondovale)


If you are using a non-standard Linux version then building librealsense from
source code with the **RSUSB backend** installation method and then building
the ROS2 wrapper from source afterwards may work better for you than the apt-
get package installation. This is because an RSUSB-based build of librealsense
is not dependent on Linux versions or kernel versions and does not require
kernel patching, so it should not matter if your Ubuntu version is a special
DEBIX image.

---

All reactions


[ ![@MartyG-
RealSense](https://avatars.githubusercontent.com/u/41145062?s=80&v=4)
](/MartyG-RealSense)


Skip to main content
NVIDIA Developer Forums
Home
Blog
Forums
Docs
Downloads
Training
Log In


Collaborator


4. Input the launch command into this second terminal window.


mr.lintse


Using a Debix SBC is a compulsory project requirement, my friend ...

---

All reactions


Hi [ @jesusramondovale ](https://github.com/jesusramondovale) It appears that
the build is failing on the error **Performing Test SUPPORTS_CXX14 - Failed**
. The current latest version 2.54.1 of librealsense introduced a change that
requires C++14 support instead of the C++11 supported in versions before
2.54.1.


2. Then afterwards install all RealSense and RealSense ROS packages with the command below.


    * [ Learning Pathways  ](https://resources.github.com/learn/pathways/)
    * [ White papers, Ebooks, Webinars  ](https://resources.github.com/)
    * [ Customer Stories ](/customer-stories)
    * [ Partners  ](https://partner.github.com/)


` Bus 002 Device 003: ID 8086:0b3a Intel Corp. Intel(R) RealSense(TM) Depth
Camera 435i `

---

The text was updated successfully, but these errors were encountered:


  * [ Code  ](/IntelRealSense/realsense-ros)
  * [ Issues  85  ](/IntelRealSense/realsense-ros/issues)
  * [ Pull requests  6  ](/IntelRealSense/realsense-ros/pulls)
  * [ Discussions  ](/IntelRealSense/realsense-ros/discussions)
  * [ Actions  ](/IntelRealSense/realsense-ros/actions)
  * [ Projects  0  ](/IntelRealSense/realsense-ros/projects)
  * [ Wiki  ](/IntelRealSense/realsense-ros/wiki)
  * [ Security  ](/IntelRealSense/realsense-ros/security)
  * [ Insights  ](/IntelRealSense/realsense-ros/pulse)


` cmake ../ -DCHECK_FOR_UPDATES=OFF `

---

All reactions


Closed


Enabling stream adds matching topics. For instance, enabling the gyro and
accel streams adds the following topics:
  * /camera/camera/accel/imu_info
  * /camera/camera/accel/metadata
  * /camera/camera/accel/sample
  * /camera/camera/extrinsics/depth_to_accel
  * /camera/camera/extrinsics/depth_to_gyro
  * /camera/camera/gyro/imu_info
  * /camera/camera/gyro/metadata
  * /camera/camera/gyro/sample
* * *
##  RGBD Topic
RGBD new topic, publishing [RGB + Depth] in the same message (see RGBD.msg for
reference). For now, works only with depth aligned to color images, as color
and depth images are synchronized by frame time tag.
These boolean paramters should be true to enable rgbd messages:
  * ` enable_rgbd ` : new paramter, to enable/disable rgbd topic, changeable during runtime
  * ` align_depth.enable ` : align depth images to rgb images
  * ` enable_sync ` : let librealsense sync between frames, and get the frameset with color and depth images combined
  * ` enable_color ` \+ ` enable_depth ` : enable both color and depth sensors
The current QoS of the topic itself, is the same as Depth and Color streams
(SYSTEM_DEFAULT)
Example:

    ros2 launch realsense2_camera rs_launch.py enable_rgbd:=true enable_sync:=true align_depth.enable:=true enable_color:=true enable_depth:=true

* * *
##  Metadata topic
The metadata messages store the camera's available metadata in a _json_
format. To learn more, a dedicated script for echoing a metadata topic in
runtime is attached. For instance, use the following command to echo the
camera/depth/metadata topic:

    python3 src/realsense-ros/realsense2_camera/scripts/echo_metadada.py /camera/camera/depth/metadata

* * *
##  Post-Processing Filters
The following post processing filters are available:


Skip to content
Toggle navigation
[ ](https://github.com/)
[ Sign in
](/login?return_to=https%3A%2F%2Fgithub.com%2FIntelRealSense%2Frealsense-ros)
  * Product
    * [ Actions  Automate any workflow  ](/features/actions)
    * [ Packages  Host and manage packages  ](/features/packages)
    * [ Security  Find and fix vulnerabilities  ](/features/security)
    * [ Codespaces  Instant dev environments  ](/features/codespaces)
    * [ Copilot  Write better code with AI  ](/features/copilot)
    * [ Code review  Manage code changes  ](/features/code-review)
    * [ Issues  Plan and track work  ](/features/issues)
    * [ Discussions  Collaborate outside of code  ](/features/discussions)
Explore
    * [ All features ](/features)
    * [ Documentation  ](https://docs.github.com)
    * [ GitHub Skills  ](https://skills.github.com/)
    * [ Blog  ](https://github.blog)
  * Solutions
For
    * [ Enterprise ](/enterprise)
    * [ Teams ](/team)
    * [ Startups ](/enterprise/startups)
    * [ Education  ](https://education.github.com)
By Solution
    * [ CI/CD & Automation ](/solutions/ci-cd/)
    * [ DevOps ](/solutions/devops/)
    * [ DevSecOps  ](https://resources.github.com/devops/fundamentals/devsecops/)
Resources
    * [ Learning Pathways  ](https://resources.github.com/learn/pathways/)
    * [ White papers, Ebooks, Webinars  ](https://resources.github.com/)
    * [ Customer Stories ](/customer-stories)
    * [ Partners  ](https://partner.github.com/)
  * Open Source
    * [ GitHub Sponsors  Fund open source developers  ](/sponsors)
    * [ The ReadME Project  GitHub community articles  ](/readme)
Repositories
    * [ Topics ](/topics)
    * [ Trending ](/trending)


Query


**[ MartyG-RealSense ](/MartyG-RealSense) ** commented  Jul 24, 2023


**[ jesusramondovale ](/jesusramondovale) ** commented  Jul 24, 2023


**[ jesusramondovale ](/jesusramondovale) ** commented  Jul 21, 2023  •


###  Footer navigation
  * [ Terms ](https://docs.github.com/site-policy/github-terms/github-terms-of-service)
  * [ Privacy ](https://docs.github.com/site-policy/privacy-policies/github-privacy-statement)
  * [ Security ](/security)
  * [ Status ](https://www.githubstatus.com/)
  * [ Docs ](https://docs.github.com/)
  * [ Contact ](https://support.github.com?tags=dotcom-footer)
  * Manage cookies
  * Do not share my personal information
You can’t perform that action at this time.


edited


ROS2 distros don't use the slave/master system so I can't launch the "ROS
Master" on my ROS2 - humble Hawskbill ROS distro...

---

All reactions


Screenshot from 2023-01-10 14-30-15
Screenshot from 2023-01-10 14-30-15
733×529 84.6 KB
Thanks in advance!


Sorry, something went wrong.


Which version of CMake are you using, please? Version 3.8 or newer is
recommended for librealsense.

---

All reactions


2 participants


#  [ROS2] Realsense Camera Node Error  #2816


still i got :
E: Unable to locate package librealsense2-utils
E: Unable to locate package librealsense2-dkms


1)I tried to install from here : librealsense/distribution_linux.md at master · IntelRealSense/librealsense · GitHub 16


Author


All reactions


Copy link


[
![@jesusramondovale](https://avatars.githubusercontent.com/u/71335809?s=80&u=685a941db48e06cf9755dda201d84325d3088551&v=4)
](/jesusramondovale)


Thanks in advance.


    debix@DEBIX26:~$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
    [sudo] password for debix:
    debix@DEBIX26:~$ curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
    curl: /usr/lib/libcurl.so.4: no version information available (required by curl)
    Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
    OK


Explore


[ Sign up
](/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-
name%3E%2F%3Crepo-
name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-
repo&source_repo=IntelRealSense%2Frealsense-ros)


Collaborator


I tried many ways-steps and still got nothing.


    ros2 launch realsense2_camera rs_intra_process_demo_launch.py intra_process_comms:=true
##  About
ROS Wrapper for Intel(R) RealSense(TM) Cameras
[ wiki.ros.org/RealSense ](http://wiki.ros.org/RealSense
"http://wiki.ros.org/RealSense")
###  Resources
Readme
###  License
Apache-2.0 license
###  Security policy
Security policy
[ Activity  ](/IntelRealSense/realsense-ros/activity)
[ Custom properties  ](/IntelRealSense/realsense-ros/custom-properties)
###  Stars
[ **2.3k** stars ](/IntelRealSense/realsense-ros/stargazers)
###  Watchers
[ **55** watching ](/IntelRealSense/realsense-ros/watchers)
###  Forks
[ **1.7k** forks ](/IntelRealSense/realsense-ros/forks)
[ Report repository ](/contact/report-
content?content_url=https%3A%2F%2Fgithub.com%2FIntelRealSense%2Frealsense-
ros&report=IntelRealSense+%28user%29)
##  [ Releases  73  ](/IntelRealSense/realsense-ros/releases)
[ ROS2 Wrapper for Intel® RealSense™ Devices (build 4.54.1)  Latest  Jun 27,
2023  ](/IntelRealSense/realsense-ros/releases/tag/4.54.1)
[ \+ 72 releases ](/IntelRealSense/realsense-ros/releases)
##  [ Packages  0  ](/orgs/IntelRealSense/packages?repo_name=realsense-ros)
No packages published
##  [ Contributors  82  ](/IntelRealSense/realsense-ros/graphs/contributors)
  *   *   *   *   *   *   *   *   *   *   *   *   *   *
[ \+ 68 contributors ](/IntelRealSense/realsense-ros/graphs/contributors)
##  Languages
  * [ Python  53.7%  ](/IntelRealSense/realsense-ros/search?l=python)
  * [ C++  43.2%  ](/IntelRealSense/realsense-ros/search?l=c%2B%2B)
  * [ CMake  2.3%  ](/IntelRealSense/realsense-ros/search?l=cmake)
  * [ Shell  0.8%  ](/IntelRealSense/realsense-ros/search?l=shell)
##  Footer
[ ](https://github.com "GitHub") © 2024 GitHub, Inc.


Sorry, something went wrong.


edited


Is there a way to run an Ubuntu 18.04 image - from jetson-containers or vanilla 18.04 image, where cuda is enabled and the right version to work with the Xavier NX on 5.x and Ubuntu 20.04?


      * [ https://ms-iot.github.io/ROSOnWindows/GettingStarted/SetupRos2.html ](https://ms-iot.github.io/ROSOnWindows/GettingStarted/SetupRos2.html)
      * Pay attention that the examples of install are for Foxy distro (which is not supported anymore by RealSense ROS2 Wrapper)
      * Please replace the word "Foxy" with Humble or Iron, depends on the chosen distro.
Step 2: Download RealSense™ ROS2 Wrapper and RealSense™ SDK 2.0 source code
from github:
  * Download Intel® RealSense™ ROS2 Wrapper source code from [ Intel® RealSense™ ROS2 Wrapper Releases ](https://github.com/IntelRealSense/realsense-ros/releases)
  * Download the corrosponding supported Intel® RealSense™ SDK 2.0 source code from the **"Supported RealSense SDK" section** of the specific release you chose fronm the link above
  * Place the librealsense folder inside the realsense-ros folder, to make the librealsense package set beside realsense2_camera, realsense2_camera_msgs and realsense2_description packages
Step 3: Build
  1. Before starting building of our packages, make sure you have OpenCV for Windows installed on your machine. If you choose the Microsoft IOT way to install it, it will be installed automatically. Later, when colcon build, you might need to expose this installation folder by setting CMAKE_PREFIX_PATH, PATH, or OpenCV_DIR environment variables
  2. Run "x64 Native Tools Command Prompt for VS 2019" as administrator
  3. Setup ROS2 Environment (Do this for every new terminal/cmd you open):
    * If you choose the Microsoft IOT Binary option for installation

                > C:\opt\ros\humble\x64\setup.bat

    * If you choose the ROS2 formal documentation:

                > call C:\dev\ros2_iron\local_setup.bat

  4. Change directory to realsense-ros folder

        > cd C:\ros2_ws\realsense-ros
  5. Build librealsense2 package only

        > colcon build --packages-select librealsense2 --cmake-args -DBUILD_EXAMPLES=OFF -DBUILD_WITH_STATIC_CRT=OFF -DBUILD_GRAPHICAL_EXAMPLES=OFF
    * User can add ` --event-handlers console_direct+ ` parameter to see more debug outputs of the colcon build
  6. Build the other packages

        > colcon build --packages-select realsense2_camera_msgs realsense2_description realsense2_camera
    * User can add ` --event-handlers console_direct+ ` parameter to see more debug outputs of the colcon build
  7. Setup environment with new installed packages (Do this for every new terminal/cmd you open):

        > call install\setup.bat
* * *
#  Usage
##  Start the camera node
####  with ros2 run:


* [ Pricing ](/pricing)


In Regard to Connecting Intel Reansense D435 to Isaac ROS VSLAM
Autonomous Machines
Robotics - Isaac
Isaac ROS
Home
Jan 2023
Mar 29 '23


thanosrom95
May 12
git clone https://github.com/IntelRealSense/librealsense.git
cd librealsense/
sudo apt install libudev-dev pkg-config libgtk-2-dev
sudo apt install libudev-dev pkg-config libgtk-3-dev
sudo apt install libusb-1.0-0-dev pkg-config
sudo apt install libglfw3-dev
sudo apt instlal libssl-dev
sudo apt install libssl-dev
sudo apt-get install libglfw3-dev libgl1-mesa-dev libglu1-mesa
sudo apt install cmake
sudo cp config/99-realsense-libusb.rules /etc/udev/rules.d/.
sudo udevadm control --reload-rules && udevadm trigger
mkdir build
cd build/
cmake ../ -DBUILD_EXAMPLES=true
make
sudo make install
cd tools/realsense-viewer
./realsense-viewer
Sorry but i cant install ros humble too , it is unable to locate the package ,any solution about this ?
Foxy seems to work but i am not sure about the results.


The documentation implies that the SDK's logging is not on by default and has
to be enabled.


You could try inputting into the CMake command line interface the instruction
below:


` ros2 run realsense2_camera realsense2_camera_node --ros-args -p
initial_reset:=true `

---

All reactions


###  License
[ Apache-2.0 license ](/IntelRealSense/realsense-
ros/blob/ros2-development/LICENSE)
[ 2.3k  stars ](/IntelRealSense/realsense-ros/stargazers) [ 1.7k  forks
](/IntelRealSense/realsense-ros/forks) [ Branches
](/IntelRealSense/realsense-ros/branches) [ Tags  ](/IntelRealSense/realsense-
ros/tags) [ Activity  ](/IntelRealSense/realsense-ros/activity)
[ Star  ](/login?return_to=%2FIntelRealSense%2Frealsense-ros)
[ Notifications ](/login?return_to=%2FIntelRealSense%2Frealsense-ros)
  * [ Code  ](/IntelRealSense/realsense-ros)
  * [ Issues  85  ](/IntelRealSense/realsense-ros/issues)
  * [ Pull requests  6  ](/IntelRealSense/realsense-ros/pulls)
  * [ Discussions  ](/IntelRealSense/realsense-ros/discussions)
  * [ Actions  ](/IntelRealSense/realsense-ros/actions)
  * [ Projects  0  ](/IntelRealSense/realsense-ros/projects)
  * [ Wiki  ](/IntelRealSense/realsense-ros/wiki)
  * [ Security  ](/IntelRealSense/realsense-ros/security)
  * [ Insights  ](/IntelRealSense/realsense-ros/pulse)
Additional navigation options
  * [ Code  ](/IntelRealSense/realsense-ros)
  * [ Issues  ](/IntelRealSense/realsense-ros/issues)
  * [ Pull requests  ](/IntelRealSense/realsense-ros/pulls)
  * [ Discussions  ](/IntelRealSense/realsense-ros/discussions)
  * [ Actions  ](/IntelRealSense/realsense-ros/actions)
  * [ Projects  ](/IntelRealSense/realsense-ros/projects)
  * [ Wiki  ](/IntelRealSense/realsense-ros/wiki)
  * [ Security  ](/IntelRealSense/realsense-ros/security)
  * [ Insights  ](/IntelRealSense/realsense-ros/pulse)
#  IntelRealSense/realsense-ros
This commit does not belong to any branch on this repository, and may belong
to a fork outside of the repository.
ros2-development
[ Branches  ](/IntelRealSense/realsense-ros/branches) [ Tags
](/IntelRealSense/realsense-ros/tags)
[ ](/IntelRealSense/realsense-ros/branches) [ ](/IntelRealSense/realsense-
ros/tags)
Go to file
Code
##  Folders and files
Name  |  Name  |


Author


Firstly, thank you for the reply, and sorry Im new to the industry. So, do you mean, after enter the Docker, run the program like this:


Copy link


There have not been many past cases on this support forum site of boards with
IMX8 so there are not many references about it, except that they had problems
with installing librealsense and RSUSB usually solved the problem.


To see all available qualifiers, see our [ documentation
](https://docs.github.com/search-github/github-code-search/understanding-
github-code-search-syntax) .


How is launch.json supposed to work if it cannot source the local environment?

---

All reactions


###  Navigation


Parameters:  |  **env** – override environment dictionary
---|---
Returns:  |  path to use use for log file directory

` on_ros_path ` (  _p_ [  , _env=None_ ]  )  → bool  ¶


##  Use saved searches to filter your results more quickly


* Solutions


Name of  ` ROS_PACKAGE_PATH  ` environment variable.


Search


  ROSCONSOLE_CONFIG_FILE
This is a [ roscpp ](/roscpp) -specific environment variable. [ rosconsole
](/rosconsole) lets you define your own configuration file that will be used
by log4cxx, defined by the ROSCONSOLE_CONFIG_FILE environment variable.
Anything defined in this config file will override the default config file.
See [ http://ros.org/doc/api/rosconsole/html/index.html
](http://ros.org/doc/api/rosconsole/html/index.html) for more information.


` get_ros_root ` (  [  _env=None_ ]  )  → str  ¶


Name of  ` ROS_LOG_DIR  ` environment variable.


Get directory location of ` .ros  ` directory (aka ` ROS_HOME  ` ). possible
locations for this. The  ` ROS_HOME  ` environment variable has priority. If
` ROS_HOME  ` is not set, ` $HOME/.ros/log  ` is used.


Parameters:  |  **env** – override environment dictionary
---|---
Returns:  |  path to use use for log file directory

` get_test_results_dir ` (  _env=None_ )  → str  ¶


` get_ros_paths ` (  [  _env=None_ ]  )  → [str]  Â¶


###  This Page


Two environments need sourcing causing two separate issues.


  ROS_TEST_RESULTS_DIR
Directory that test results should be written to.


` ROS_LOG_DIR ` ¶


**[ ooeygui ](/ooeygui) ** commented  Jan 15, 2024


` ROS_HOME ` ¶


####  Previous topic


Skip to content


a002c0a7a505520666bc6e9362677fd93)
.


Include my email address so I can be contacted


Open


Get directory to use for writing test result files. There are multiple
possible locations for this. The  ` ROS_TEST_RESULTS_DIR  ` environment
variable has priority. If that is set,  ` ROS_TEST_RESULTS_DIR  ` is returned.
If  ` ROS_TEST_RESULTS_DIR  ` is not set, then  ` ROS_HOME  ` /test_results is
used. If  ` ROS_HOME  ` is not set, ` $HOME/.ros/test_results  ` is used.


When I add a task to run colcon build, it does not source the ROS environment.


Author


[
![@ooeygui](https://avatars.githubusercontent.com/u/4564624?s=80&u=dbb1908c3610ab957af757bd7c6faf125164e466&v=4)
](/ooeygui)


You signed in with another tab or window. [ Reload ]() to refresh your
session.  You signed out in another tab or window. [ Reload ]() to refresh
your session.  You switched accounts on another tab or window. [ Reload ]() to
refresh your session.  Dismiss alert


Copy link


Clear


It would be desirable for SSH not to adversely impact this extension's
functionality.

---

👍  1  ooeygui reacted with thumbs up emoji


New issue


  ROS_CACHE_TIMEOUT
(See [ rospack's api doc
](http://docs.ros.org/independent/api/rospkg/html/rospack.html


  1. Add ` "ros.distro": "humble", ` to .vscode/settings.json on the remote computer
  2. Add this to tasks.json

               {
            "label": "colconBuildDebug",
            "detail": "Build ROS 2 workspace with debug symbols",
            "type": "shell",
            "command": "colcon build --symlink-install --mixin debug",
            "group": "build",
            "problemMatcher": "$gcc"
        },


#  The Humble environment isn't sourced in tasks


Then, the launch still fails because it's not sourcing the local ROS workspace
before launch:


Hello,


[ ROS stack access ](stacks.html "previous chapter")


Get the current  ` ROS_ROOT  ` .


##  bbappends


##  Repro steps


` rospkg.environment. ` ` ROS_HOME ` Â¶


Member


[ ROS stack access ](rospkg_stacks.html "previous chapter")


Labels


Parameters:  |  **env** â (optional) environment override.
---|---

` get_ros_home ` (  [  _env=None_ ]  )  → str  Â¶


Copy link


[
![@ooeygui](https://avatars.githubusercontent.com/u/4564624?s=40&u=dbb1908c3610ab957af757bd7c6faf125164e466&v=4)
](/ooeygui) [ ooeygui ](/ooeygui) added [ help wanted ](/ms-iot/vscode-
ros/labels/help%20wanted) Extra attention is needed  [ Building ](/ms-
iot/vscode-ros/labels/Building) Features and bugs which affect building ROS
labels  Jan 15, 2024


  ROS_LANG_DISABLE
A colon-separated list of package names for message generators / client
libraries that should be disabled. Message-generation will not happen for
languages in this list.
For packages build with **catkin** you need to list the names of the message
generators which should be ignored, e.g.:

    export ROS_LANG_DISABLE=genlisp
For packages build with **rosbuild** you need to list the names of the message
generators _as well as_ the client libraries which should be ignored, e.g.:

    export ROS_LANG_DISABLE=genlisp:roslisp
When ignoring message generators with rosbuild the CMake configure step will
show a warning that the client library (e.g. ` roslisp ` ) is not a known
message generator. This warning can safely be ignored.
Note that before disabling a language, you should first be very sure that none
of the code you're using requires that language's bindings.


Parameters:  |  **env** â override environment dictionary
---|---
Returns:  |  path to use use for log file directory

` get_test_results_dir ` (  _env=None_ )  → str  Â¶


Even if I add ` source /opt/ros/humble/setup.bash ` to my bashrc, it doesn't
source.


Open


Toggle navigation


Parameters:  |  **env** â override environment dictionary
---|---
Returns:  |  path to use use for log file directory

###  Navigation


     *  Executing task: colcon build --symlink-install --mixin debug

    Starting >>> grid_map_geo
    --- stderr: grid_map_geo
    Traceback (most recent call last):
      File "/opt/ros/humble/share/ament_cmake_core/cmake/package_templates/templates_2_cmake.py", line 21, in <module>
        from ament_package.templates import get_environment_hook_template_path
    ModuleNotFoundError: No module named 'ament_package'
    CMake Error at /opt/ros/humble/share/ament_cmake_core/cmake/ament_cmake_package_templates-extras.cmake:41 (message):
      execute_process(/usr/bin/python3.10
      /opt/ros/humble/share/ament_cmake_core/cmake/package_templates/templates_2_cmake.py
      /home/ryan/Dev/ros2_ws/src/grid_map_geo/build/grid_map_geo/ament_cmake_package_templates/templates.cmake)
      returned error code 1
    Call Stack (most recent call first):
      /opt/ros/humble/share/ament_cmake_core/cmake/ament_cmake_coreConfig.cmake:41 (include)
      /opt/ros/humble/share/ament_cmake/cmake/ament_cmake_export_dependencies-extras.cmake:15 (find_package)
      /opt/ros/humble/share/ament_cmake/cmake/ament_cmakeConfig.cmake:41 (include)
      CMakeLists.txt:18 (find_package)

    ---
    Failed   <<< grid_map_geo [0.13s, exited with code 1]

    Summary: 0 packages finished [0.50s]
      1 package failed: grid_map_geo
      1 package had stderr output: grid_map_geo

     *  The terminal process "/bin/bash '-c', 'colcon build --symlink-install --mixin debug'" terminated with exit code: 1.
     *  Terminal will be reused by tasks, press any key to close it.


(Please add appropriate labels)


#  Saved searches


Get directory to use for writing log files. There are multiple possible
locations for this. The  ` ROS_LOG_DIR  ` environment variable has priority.
If that is not set, then  ` ROS_HOME  ` /log is used. If  ` ROS_HOME  ` is not
set, ` $HOME/.ros/log  ` is used.


[ bug  ](/ms-iot/vscode-ros/labels/bug) Something isn't working  [ Building
](/ms-iot/vscode-ros/labels/Building) Features and bugs which affect building
ROS  [ help wanted  ](/ms-iot/vscode-ros/labels/help%20wanted) Extra attention
is needed


* [ latest ](http://readthedocs.org/docs/rospkg/en/latest/)


Cancel  Create saved search


I don't know if it is possible to support this scenario. VSCode extension
model has hooks for various events, which allows code to extension code to
execute. Tasks.json is handled by VSCode - but it doesn't (last I looked)
provide a general pre-execution hook to allow an extension to modify the
execution environment.


Resources


Author


[ ![@ooeygui](https://avatars.githubusercontent.com/u/4564624?s=52&v=4)
](/ooeygui) [
![@Ryanf55](https://avatars.githubusercontent.com/u/25047695?s=52&v=4)
](/Ryanf55)


This recipe is appended by:


[ OS detection ](os_detect.html "next chapter")


[ ![@Ryanf55](https://avatars.githubusercontent.com/u/25047695?s=80&v=4)
](/Ryanf55)


Colcon build will be successful and first ` source /opt/ros/humble/setup.bash
` before running.


    * [ CI/CD & Automation ](/solutions/ci-cd/)
    * [ DevOps ](/solutions/devops/)
    * [ DevSecOps  ](https://resources.github.com/devops/fundamentals/devsecops/)


  PYTHONPATH
ROS requires that your ` PYTHONPATH ` be updated, **even if you don't program
in Python!** Many ROS infrastructure tools rely on Python and need access to
the [ roslib ](/roslib) package for bootstrapping.

    export PYTHONPATH=$PYTHONPATH:$ROS_ROOT/core/roslib/src


Query


[ Brought to you by Read the Docs
](http://readthedocs.org/projects/rospkg/?fromdocs=rospkg)


* 👍  1 reaction


` ROS_PACKAGE_PATH ` ¶


* [ GitHub Sponsors  Fund open source developers  ](/sponsors)


1 of 4 tasks


[
![@ooeygui](https://avatars.githubusercontent.com/u/4564624?s=80&u=dbb1908c3610ab957af757bd7c6faf125164e466&v=4)
](/ooeygui)


  ROS_PACKAGE_PATH
` ROS_PACKAGE_PATH ` is an optional, but very common environment variable that
allows you to add more ROS packages from source to your environment. `
ROS_PACKAGE_PATH ` can be composed of one or more paths separated by your
standard OS path separator (e.g. ':' on Unix-like systems). These _ordered_
paths tell the ROS system where to search for more ROS packages. If there are
multiple packages of the same name, ROS will choose the one that appears on `
ROS_PACKAGE_PATH ` _first_ .

    export ROS_PACKAGE_PATH=/home/user/ros/ros-pkg:/another/path
Note that each entry in ` ROS_PACKAGE_PATH ` is searched recursively--all ROS
packages below the named path will be found.
With the introduction of catkin, the need to manually update `
ROS_PACKAGE_PATH ` becomes obsolete, and is only necessary for backwards
compatibility with rosbuild packages.


  3. Ensure the ROS extension is started and running in pre-release on the development server
  4. Type F1: ` Tasks: Run task ` and select ` colconBuildDebug `
  5. Observe the output showing that it never sourced the ROS environment


**Have a question about this project?** Sign up for a free GitHub account to
open an issue and contact its maintainers and the community.


Parameters:  |  **env** – override environment dictionary
---|---
Returns:  |  path to use use for log file directory

` get_log_dir ` (  [  _env=None_ ]  )  → str  ¶


Parameters:  |  **env** â override environment dictionary
---|---

` get_ros_package_path ` (  [  _env=None_ ]  )  Â¶


**[ Ryanf55 ](/Ryanf55) ** commented  Jan 20, 2024


All reactions


###  Quick search


Email Address


forked from [ ajshort/vscode-ros ](/ajshort/vscode-ros)


Name of  ` ROS_ROOT  ` environment variable.


  * [ index ](genindex.html "General Index")
  * [ modules ](py-modindex.html "Python Module Index") |
  * [ next ](os_detect.html "OS detection") |
  * [ previous ](rospkg_stacks.html "ROS stack access") |
  * [ ROS packages 1.5.0 documentation ](contents.html) »
  * [ rospkg documentation ](python_api.html) »


By clicking “Sign up for GitHub”, you agree to our [ terms of service
](https://docs.github.com/terms) and [ privacy statement
](https://docs.github.com/privacy) . We’ll occasionally send you account
related emails.


A workaround as I already shared is to prepend all commands with ` source
/opt/ros/humble/setup.bash && `


© Copyright 2011, Willow Garage. Created using [ Sphinx
](http://sphinx.pocoo.org/) 1.0.7.


#  [bug] ROS distro not sourced for tasks.json on humble  #1272


Labels


  * [ index ](genindex.html "General Index")
  * [ modules ](py-modindex.html "Python Module Index") |
  * [ next ](os_detect.html "OS detection") |
  * [ previous ](stacks.html "ROS stack access") |
  * [ rospkg v0.2.0 documentation ](index.html) »


Milestone


[ OpenEmbedded Layer Index ](/layerindex/)


  ROS_HOME

By default, ROS writes data to ` ~/.ros ` . This location can be changed by
setting an optional ` ROS_HOME ` . You can also change the location of certain
individual directories in ` ~/.ros ` (e.g. ` ROS_TEST_RESULTS_DIR ` , `
ROS_LOG_DIR ` ).


Sourcing ROS and the overlay is one of the main reasons that the VSCode ROS
extension has its own task execution for build and debug.


  ROS_MASTER_URI
` ROS_MASTER_URI ` is a required setting that tells nodes where they can
locate the master. It should be set to the XML-RPC URI of the master. Great
care should be taken when using ` localhost ` , as that can lead to unintended
behaviors with remotely launched nodes.

    export ROS_MASTER_URI=http://mia:11311/


Copy link


Cancel  Submit feedback


Member


Name of  ` ROS_ETC_DIR  ` environment variable.


` rospkg.environment. ` ` ROS_LOG_DIR ` Â¶


#  ROS environment variable access  Â¶


[ ![@Ryanf55](https://avatars.githubusercontent.com/u/25047695?s=40&v=4)
](/Ryanf55) [ Ryanf55 ](/Ryanf55) added the [ bug ](/ms-iot/vscode-
ros/labels/bug) Something isn't working  label  Jan 15, 2024


  ROS_NAMESPACE
` ROS_NAMESPACE ` lets you _push down_ a Node into a namespace. All of the
names in the Node will be resolved relative to this value, including remapped
names.


Check to see if filesystem path is on paths specified in ROS environment (  `
ROS_ROOT  ` ,  ` ROS_PACKAGE_PATH  ` ).


2 participants


  ROS_WORKSPACE
` ROS_WORKSPACE ` is introduced by the rosinstall / rosws tools, it is set by
setup.sh that is generated by these tools when creating a workspace. It points
to the folder of the workspace and is used by the rosws command as a default
target of the command.
The roscd tool in fuerte was also changed to use that variable when called
without arguments. Previously it had defaulted to change to ` ROS_ROOT ` .


[ bug  ](/ms-iot/vscode-ros/labels/bug) Something isn't working  [ Building
](/ms-iot/vscode-ros/labels/Building) Features and bugs which affect building
ROS  [ help wanted  ](/ms-iot/vscode-ros/labels/help%20wanted) Extra attention
is needed


Sorry, something went wrong.


` rospkg.environment. ` ` ROS_ETC_DIR ` Â¶


Full-text doc search.


We register a VSCode launch.json handler which is ROS aware - and is able to
source the environment. The Task..json file is not used when you use the ROS
mechanism, so the extension can control the environment.

---

All reactions


Parameters:  |  **env** – (optional) environment override.
---|---

` get_ros_home ` (  [  _env=None_ ]  )  → str  ¶


I'm not sure if you need more info, but it appears this bug is only present
when SSH'ing from Windows. If I have direct access to the Linux computer, the
launch task works fine, and colcon build tasks works fine with the workaround
I posted.


[ ](https://github.com "GitHub") © 2024 GitHub, Inc.


Copy link


**[ Ryanf55 ](/Ryanf55) ** commented  Jan 15, 2024


Projects


#  [bug] ROS distro not sourced for tasks.json on humble  #1272


##  Comments


This recipe in other branches of meta-ros2-humble:


You can’t perform that action at this time.


Name of  ` ROS_HOME  ` environment variable.


Explore


Get directory location of ` .ros  ` directory (aka ` ROS_HOME  ` ). possible
locations for this. The  ` ROS_LOG_DIR  ` environment variable has priority.
If that is not set, then  ` ROS_HOME  ` /log is used. If  ` ROS_HOME  ` is not
set, ` $HOME/.ros/log  ` is used.


  * [ Notifications ](/login?return_to=%2Fms-iot%2Fvscode-ros)
  * [ Fork  92  ](/login?return_to=%2Fms-iot%2Fvscode-ros)
  * [ Star  379  ](/login?return_to=%2Fms-iot%2Fvscode-ros)


edited


Name of  ` ROS_LOG_DIR  ` environment variable.


[ ![@Ryanf55](https://avatars.githubusercontent.com/u/25047695?s=80&v=4)
](/Ryanf55)


Password


###  Navigation


  ROS 2 Documentation
The ROS Wiki is for ROS 1. Are you using ROS 2 ( [ Humble
](http://docs.ros.org/en/humble/) , [ Iron ](http://docs.ros.org/en/iron/) ,
or [ Rolling ](http://docs.ros.org/en/rolling/) )?
[ Check out the ROS 2 Project Documentation ](http://docs.ros.org)
Package specific documentation can be found on [ index.ros.org
](https://index.ros.org)


Search or jump to...


We read every piece of feedback, and take your input very seriously.


The problem here is using Task.json; I don't believe there is a hook for the
ROS extension in that codepath of VSCode to influence the _task_ environment.


**[ ooeygui ](/ooeygui) ** commented  Jan 21, 2024


Enter search terms or a module, class or function name.


**[ ooeygui ](/ooeygui) ** commented  Jan 15, 2024


Plugin v0.9.6 pre-release


* [ Show Source ](_sources/rospkg_environment.rst.txt)


I'm happy to set up a debug build of vscode, or whatever else you need to help
you solve these issues on Ubuntu.

---

All reactions


  ROS_BOOST_ROOT
` ROS_BOOST_ROOT ` is an optional environment variable that lets you override
where to search for boost. If ` ROS_BOOST_ROOT ` is not set it defaults to
using ` ROS_BINDEPS_PATH `


[ Submit layer ](/layerindex/submit/)


Name


Get the current  ` ROS_PACKAGE_PATH  ` . NOTE: it is preferable to call  `
get_ros_paths()  ` instead of directly querying ROS environment variable
values.


Name of  ` ROS_ROOT  ` environment variable.


Sorry, something went wrong.


    * [ Topics ](/topics)
    * [ Trending ](/trending)
    * [ Collections ](/collections)


  ROS_LOCATIONS
` ROS_LOCATIONS ` is an optional environment variable that provides keyed
names for useful locations. It is a ` : ` separated list of key-location
pairs. Each key-location pair is separated by an ` = ` . For example:

    export ROS_LOCATIONS="rospkg=/path/to/rospkg:stairpkg=/path/to/stairpkg"
These keys can then be used in tools such as roscd.


Get directory to use for writing test result files. There are multiple
possible locations for this. The  ` ROS_TEST_RESULTS_DIR  ` environment
variable has priority. If that is set,  ` ROS_TEST_RESULTS_DIR  ` is returned.
If  ` ROS_TEST_RESULTS_DIR  ` is not set, then  ` ROS_HOME  ` /test_results is
used. If  ` ROS_HOME  ` is not set, ` $HOME/.ros/test_results  ` is used.


####  Previous topic


Copy link


  ROS_ROOT
` ROS_ROOT ` sets the location where the ROS core packages are installed.

    export ROS_ROOT=/home/user/ros/ros
    export PATH=$ROS_ROOT/bin:$PATH


Node Environment Variables


* [ Pricing ](/pricing)


Pick a username


#  expected behavior


The environment APIs of [ ` rospkg  ` ](index.html#module-rospkg "rospkg")
provide convenient access to ROS package-related environment variables,
including methods that provide default values when environment variable
overrides are not active.


Parameters:  |  **env** â override environment dictionary
---|---

` get_ros_root ` (  [  _env=None_ ]  )  → str  Â¶


####  Next topic


[ Sign up for free ](/join?source=comment-repo) **to join this conversation on
GitHub** . Already have an account? [ Sign in to comment
](/login?return_to=https%3A%2F%2Fgithub.com%2Fms-iot%2Fvscode-
ros%2Fissues%2F1272)


* [ latest ](http://readthedocs.org/docs/rospkg/en/latest/)


Without this, ros2 will give an error as I shared earlier:
` package <myRos2Pkg> not found `


Parameters:  |  **p** – path, ` str  `
---|---
Returns:  |  True if p is on the ROS path (ROS_ROOT, ROS_PACKAGE_PATH)

###  Project Versions


For this scenario, you may be able to manually prefix the command with the
environment script, or build your own script which sources the environments
then runs colcon.

---

All reactions


No milestone


Member


For


All reactions


Additional navigation options


[ ](https://github.com/)


[ Sign in ](/login?return_to=https%3A%2F%2Fgithub.com%2Fms-iot%2Fvscode-
ros%2Fissues%2F1272)


{{ message }}


[ OS detection ](os_detect.html "next chapter")


#  what is the bug


  ROS_PYTHON_LOG_CONFIG_FILE
This is specific to [ rospy ](/rospy) , [ rosmaster ](/rosmaster) , [
roslaunch ](/roslaunch) , and [ rostest ](/rostest) . For these tools, you can
define your own Python ` logging ` configuration file to use instead of the

default config file, which is stored in ` $ROS_ROOT/config/python_logging.conf
` .
For more information, see the Python ` logging ` documentation:
[ http://docs.python.org/library/logging.html
](http://docs.python.org/library/logging.html)


Additional PATH Environment Variables


Sorry, something went wrong.


[ Ryanf55 ](/Ryanf55) opened this issue  Jan 15, 2024  · 7 comments


Name of  ` ROS_TEST_RESULTS_DIR  ` environment variable.


    * [ All features ](/features)
    * [ Documentation  ](https://docs.github.com)
    * [ GitHub Skills  ](https://skills.github.com/)
    * [ Blog  ](https://github.blog)


[ @Ryanf55 ](https://github.com/Ryanf55) That interesting - thanks for the
note. It certainly narrows down where this could be going wrong.

---

All reactions


    * [ Actions  Automate any workflow  ](/features/actions)
    * [ Packages  Host and manage packages  ](/features/packages)
    * [ Security  Find and fix vulnerabilities  ](/features/security)
    * [ Codespaces  Instant dev environments  ](/features/codespaces)
    * [ Copilot  Write better code with AI  ](/features/copilot)
    * [ Code review  Manage code changes  ](/features/code-review)
    * [ Issues  Plan and track work  ](/features/issues)
    * [ Discussions  Collaborate outside of code  ](/features/discussions)


Sign up for GitHub


#  ros-environment


#  Search code, repositories, users, issues, pull requests...


Copy link


Get the current  ` ROS_ROOT  ` . NOTE: it is preferable to call  `
get_ros_paths()  ` instead of directly querying ROS environment variable
values.


Jump to bottom


  Wiki
  * [ Distributions ](/Distributions)
  * [ ROS/Installation ](/ROS/Installation)
  * [ ROS/Tutorials ](/ROS/Tutorials)
  * [ RecentChanges ](/RecentChanges)
  * [ ROS/EnvironmentVariables ](/ROS/EnvironmentVariables)


[ ![Logo](_static/ros.png) ](contents.html)


#  additional context


Check to see if filesystem path is on paths specified in ROS environment (  `
ROS_ROOT  ` ,  ` ROS_PACKAGE_PATH  ` ).


System Data Environment Variables


###  RTD Search


Name  |  ros-environment
---|---
Version  |
Summary  |
Description  |
Section  |
License  |
Homepage  |
Recipe file  |  generated-recipes/ros-environment/ros-environment_3.2.2-1.bb
Layer  |  [ meta-ros2-humble ](/layerindex/branch/nanbield/layer/meta-
ros2-humble/) (nanbield branch)
Inherits  |
Dependencies __ |
PACKAGECONFIG options  |

##  Sources


Get an ordered list of ROS paths to search for ROS packages, stacks, and other
resources. This is generally computed from  ` ROS_ROOT  ` and  `
ROS_PACKAGE_PATH  ` .


No one assigned


efficiency-
considerations) for the detail).
[ rospack ](/rospack) re-parses the ` package.xml ` files and rebuilds the
dependency tree on each execution. However, it maintains a cache of package
directories in ` ROS_ROOT/.rospack_cache ` . This cache is updated whenever
there is a cache miss, or when the cache is 60 seconds old. You can change
this timeout by setting the environment variable ` ROS_CACHE_TIMEOUT ` , in
seconds. Set it to 0.0 to force a cache rebuild on every invocation of `
rospack ` .


Branch  |  Recipe
---|---
master  |  [ ros-environment 3.2.2-1 ](/layerindex/recipe/388780/)
nanbield (Yocto Project 4.3)  |  ros-environment (this recipe)
mickledore (Yocto Project 4.2)  |  [ ros-environment
](/layerindex/recipe/391490/)
langdale (Yocto Project 4.1)  |  [ ros-environment
](/layerindex/recipe/392845/)
kirkstone (Yocto Project 4.0)  |  [ ros-environment 3.2.2-1
](/layerindex/recipe/394200/)
honister (Yocto Project 3.4)  |  [ ros-environment 3.2.0-3
](/layerindex/recipe/395279/)

* * *


And, you are unable to debug your code in VSCode with the build in GDB GUI
with a ` launch.json ` .


#  Provide feedback


  * [ index ](genindex.html "General Index")
  * [ modules ](py-modindex.html "Python Module Index") |
  * [ next ](os_detect.html "OS detection") |
  * [ previous ](stacks.html "ROS stack access") |
  * [ rospkg v0.2.0 documentation ](index.html) »


Get directory location of ` /etc/ros  ` directory. The  ` ROS_ETC_DIR  `
environment variable has priority. If  ` ROS_ETC_DIR  ` is not set, ` /etc/ros
` is used.


Name of  ` ROS_HOME  ` environment variable.


**[ ooeygui ](/ooeygui) ** commented  Jan 16, 2024


Parameters:  |  **env** â override environment dictionary
---|---
Returns:  |  path to use use for log file directory

` get_log_dir ` (  [  _env=None_ ]  )  → str  Â¶


  ROS_PARALLEL_JOBS
The value of this variable, if set, is passed to ` make ` when building
packages. The idea is to let you exploit a multi-processor machine. For
example, if you have 8 processors / cores and want to run as many parallel
jobs as possible, as long as the system load is less than 8, by limiting the
jobs to 8 you prevent overshoot at startup time:

    export ROS_PARALLEL_JOBS='-j8 -l8'
Alternatively, you could use the ` -j ` flag with an argument to run up to 8
jobs in parallel, independent of system load:

    export ROS_PARALLEL_JOBS=-j8
We **strongly** recommend using the ` -l ` flag to set a system load-dependent
limit on parallelism. Excessive parallelism in a large build can exhaust
system memory.
What system load is acceptable to you depends on how many cores you have: [
http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages
](http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages)
So 8 might be suitable for a machine with 8 cores.


Name of  ` ROS_PACKAGE_PATH  ` environment variable.


The first is ` /opt/ros/humble/setup.bash ` which needs to be sourced if you
want to add a ` colcon build ` task as shown at this [ timestamp in the video
](https://youtu.be/k2TLdXHjVsU?si=H8qYJJ-B0hBLhe4Y&t=293) .


[ ms-iot ](/ms-iot) /  **[ vscode-ros ](/ms-iot/vscode-ros) ** Public


  Page
  * Immutable Page
  * Comments
  * [ Info ](/action/info/ROS/EnvironmentVariables?action=info)
  * [ Attachments ](/action/AttachFile/ROS/EnvironmentVariables?action=AttachFile)
  * More Actions:  Raw Text  Print View  Render as Docbook  Delete Cache  \------------------------  Check Spelling  Like Pages  Local Site Map  \------------------------  Rename Page  Copy Page  Delete Page  \------------------------  My Pages  Subscribe User  \------------------------  Remove Spam  Revert to this revision  Package Pages  Sync Pages  \------------------------  CreatePdfDocument  Load  RawFile  Save  SlideShow


[ Ryanf55 ](/Ryanf55) opened this issue  Jan 15, 2024  · 7 comments


Already on GitHub? [ Sign in ](/login?return_to=%2Fms-iot%2Fvscode-
ros%2Fissues%2Fnew%2Fchoose) to your account


  * [ nanbield ](/layerindex/branch/nanbield/layers/)
  * [ meta-ros2-humble ](/layerindex/branch/nanbield/layer/meta-ros2-humble/)
  * ros-environment


Parameters:  |  **env** – override environment dictionary
---|---

` get_ros_package_path ` (  [  _env=None_ ]  )  ¶


Development


As a workaround, I could do modify the task command like so, but that is not
documented:
` "command": "source /opt/ros/humble/setup.bash && colcon build --symlink-
install --mixin debug", `


Get the current  ` ROS_PACKAGE_PATH  ` .


#  The local workspace is not sourced for ROS launch in debuggerlaunch


1 of 4 tasks


The environment APIs of [ ` rospkg  ` ](python_api.html#module-rospkg
"rospkg") provide convenient access to ROS package-related environment
variables, including methods that provide default values when environment
variable overrides are not active.


  Build System Environment Variables
In order to understand these environment variables better, please see the
section on the [ ROS Build System ](/ROS/BuildSystem) .


  ROS_LOG_DIR
By default, ROS writes internal log files to ROS_HOME/log. If this location is
not writable to ROS, or if you wish for log files to be written elsewhere, set
ROS_LOG_DIR to that path.


Assignees


Name of  ` ROS_TEST_RESULTS_DIR  ` environment variable.


Additional Bash Environment Variables


  * [ Terms ](https://docs.github.com/site-policy/github-terms/github-terms-of-service)
  * [ Privacy ](https://docs.github.com/site-policy/privacy-policies/github-privacy-statement)
  * [ Security ](/security)
  * [ Status ](https://www.githubstatus.com/)
  * [ Docs ](https://docs.github.com/)
  * [ Contact ](https://support.github.com?tags=dotcom-footer)
  * Manage cookies
  * Do not share my personal information


##  Patches


###  This Page


Regardless of whether you build through a task, or build using your terminal,
the local workspace has the build binaries and environment setup located in
the default ` install ` folder. Before calling ` ros2 launch <myRos2Pkg>
<myLaunchFile.xml> ` , you need to type this in Ubuntu:
` source install/setup.bash `


[ change history ](/layerindex/history/) • [ about this site
](/layerindex/about/) • [ FAQ ](http://www.openembedded.org/Layers_FAQ)


  ROS_OS_OVERRIDE
Format: "OS_NAME:OS_VERSION_STRING:OS_CODENAME" This will force it to detect
Ubuntu Bionic:

    export ROS_OS_OVERRIDE=ubuntu:18.04:bionic
If defined, this will override the autodetection of an OS. This can be useful
when debugging rosdep dependencies on alien platforms, when platforms are
actually very similar and might need be forced, or of course if the
autodetection is failing.
Wiki: ROS/EnvironmentVariables (last edited 2019-09-13 13:17:31 by  [
BryceWilley ](/BryceWilley "BryceWilley @ 104.238.237.109\[104.238.237.109\]")
)
Except where otherwise noted, the ROS wiki is licensed under the
[ Creative Commons Attribution 3.0
](http://creativecommons.org/licenses/by/3.0/)
* * *
[ ![](/custom/images/brought_by_horiz.png) ](https://www.openrobotics.org/)


` ROS_ROOT ` ¶


` rospkg.environment. ` ` ROS_ROOT ` Â¶


#  ROS environment variable access  ¶


  User
  * [ Login ](/action/login/ROS/EnvironmentVariables?action=login)
Contents

  1. Required ROS Environment Variables
    1. ROS_ROOT
    2. ROS_MASTER_URI
    3. PYTHONPATH
  2. Additional PATH Environment Variables
    1. ROS_PACKAGE_PATH
  3. System Data Environment Variables
    1. ROS_HOME
    2. ROS_LOG_DIR
    3. ROS_TEST_RESULTS_DIR
    4. ROS_CACHE_TIMEOUT
  4. Additional Bash Environment Variables
    1. ROS_LOCATIONS
    2. ROS_WORKSPACE
  5. Node Environment Variables
    1. ROS_IP/ROS_HOSTNAME
    2. ROS_NAMESPACE
    3. ROSCONSOLE_CONFIG_FILE
    4. Console Output Formatting
    5. ROS_PYTHON_LOG_CONFIG_FILE
  6. Build System Environment Variables
    1. ROS_BOOST_ROOT
    2. ROS_PARALLEL_JOBS
    3. ROS_LANG_DISABLE
    4. ROS_OS_OVERRIDE
There are many environment variables that you can set to affect the behavior
of ROS. Of these, the most important to understand are ` ROS_MASTER_URI ` , `
ROS_ROOT ` , and ` ROS_PACKAGE_PATH ` as they are commonly used in the system
and frequently mentioned in documentation.
Environment variables serve a variety of roles in ROS:
  * _Finding packages_ : First and foremost, the ` ROS_ROOT ` and ` ROS_PACKAGE_PATH ` enable ROS to locate [ packages ](/Packages) and [ stacks ](/Stacks) in the filesystem. You must also set the ` PYTHONPATH ` so that the Python interpreter can find ROS libraries.
  * _Effecting a Node runtime_ : There are also several ROS environment variables that effect how a Node runs. The ` ROS_MASTER_URI ` is an important environment variable that tells a Node where the [ Master ](/Master) is. ` ROS_IP ` and ` ROS_HOSTNAME ` affect the network address of a Node and ` ROS_NAMESPACE ` lets you change its namespace. ` ROS_LOG_DIR ` lets you set the directory where log files are written. Many of these can be overridden by [ Remapping Arguments ](/Remapping%20Arguments) as well, which have precedence over environment variables.
  * _Modifying the build system_ : ` ROS_BINDEPS_PATH ` , ` ROS_BOOST_ROOT ` , ` ROS_PARALLEL_JOBS ` , and ` ROS_LANG_DISABLE ` affect where libraries are found, how they are built, and which ones are built.
These environment variables and more are described in greater detail below.


Parameters:  |  **p** â path, ` str  `
---|---
Returns:  |  True if p is on the ROS path (ROS_ROOT, ROS_PACKAGE_PATH)

` get_etc_ros_dir ` (  [  _env=None_ ]  )  → str  Â¶


    * [ Learning Pathways  ](https://resources.github.com/learn/pathways/)
    * [ White papers, Ebooks, Webinars  ](https://resources.github.com/)
    * [ Customer Stories ](/customer-stories)
    * [ Partners  ](https://partner.github.com/)


* [ The ReadME Project  GitHub community articles  ](/readme)


None yet


##  Footer


* Product


By Solution


  * [ Code  ](/ms-iot/vscode-ros)
  * [ Issues  125  ](/ms-iot/vscode-ros/issues)
  * [ Pull requests  11  ](/ms-iot/vscode-ros/pulls)
  * [ Discussions  ](/ms-iot/vscode-ros/discussions)
  * [ Actions  ](/ms-iot/vscode-ros/actions)
  * [ Projects  9  ](/ms-iot/vscode-ros/projects)
  * [ Security  ](/ms-iot/vscode-ros/security)
  * [ Insights  ](/ms-iot/vscode-ros/pulse)


© Copyright 2011, Willow Garage. Created using [ Sphinx ](http://sphinx-
doc.org/) 1.8.5.


` rospkg.environment. ` ` ROS_PACKAGE_PATH ` Â¶


  * [ Code  ](/ms-iot/vscode-ros)
  * [ Issues  ](/ms-iot/vscode-ros/issues)
  * [ Pull requests  ](/ms-iot/vscode-ros/pulls)
  * [ Discussions  ](/ms-iot/vscode-ros/discussions)
  * [ Actions  ](/ms-iot/vscode-ros/actions)
  * [ Projects  ](/ms-iot/vscode-ros/projects)
  * [ Security  ](/ms-iot/vscode-ros/security)
  * [ Insights  ](/ms-iot/vscode-ros/pulse)


Copy link


Repositories


* Open Source


Sorry, something went wrong.


[ meta-ros2-dashing ](/layerindex/branch/nanbield/layer/meta-ros2-dashing/) |
[ ros-environment_2.3.0-1.bbappend ](http://github.com/ros/meta-
ros/blob/nanbield/meta-ros2-dashing/recipes-bbappends/ros-environment/ros-
environment_2.3.0-1.bbappend)
---|---
[ meta-ros2-eloquent ](/layerindex/branch/nanbield/layer/meta-ros2-eloquent/)
|  [ ros-environment_2.4.1-1.bbappend ](http://github.com/ros/meta-
ros/blob/nanbield/meta-ros2-eloquent/recipes-bbappends/ros-environment/ros-
environment_2.4.1-1.bbappend)
[ meta-ros1-noetic ](/layerindex/branch/nanbield/layer/meta-ros1-noetic/) |  [
ros-environment_1.3.2-1.bbappend ](http://github.com/ros/meta-
ros/blob/nanbield/meta-ros1-noetic/recipes-bbappends/ros-environment/ros-
environment_1.3.2-1.bbappend)

##  Other branches


No branches or pull requests


[
![@ooeygui](https://avatars.githubusercontent.com/u/4564624?s=80&u=dbb1908c3610ab957af757bd7c6faf125164e466&v=4)
](/ooeygui)


  * [ index ](genindex.html "General Index")
  * [ modules ](py-modindex.html "Python Module Index") |
  * [ next ](os_detect.html "OS detection") |
  * [ previous ](rospkg_stacks.html "ROS stack access") |
  * [ ROS packages 1.5.0 documentation ](contents.html) »
  * [ rospkg documentation ](python_api.html) »


[ Search syntax tips ](https://docs.github.com/search-github/github-code-
search/understanding-github-code-search-syntax)


###  Footer navigation


Member


[ ![ros.org](/custom/images/ros_org.png) ](/) |  [ About
](http://www.ros.org/about-ros) | [ Support ](/Support) | [ Discussion Forum
](http://discourse.ros.org/) | [ Index ](http://index.ros.org/) | [ Service
Status ](http://status.ros.org/) | [ ros @ Robotics Stack Exchange
](https://robotics.stackexchange.com/questions/tagged/ros)
---|---
![](/custom/images/menu_left.png) [
![Documentation](/custom/images/menu_documentation.png) ](/)
![](/custom/images/menu_spacer.png) [ ![Browse
Software](/custom/images/menu_browse_software.png)
](https://index.ros.org/packages) ![](/custom/images/menu_spacer.png) [
![News](/custom/images/menu_news.png) ](https://discourse.ros.org/c/general)
![](/custom/images/menu_spacer.png) [
![Download](/custom/images/menu_download.png) ](/ROS/Installation)
![](/custom/images/menu_right.png)

  * [ ROS ](/ROS)
  * [ EnvironmentVariables ](/ROS/EnvironmentVariables)


Parameters:  |  **env** â override environment dictionary
---|---
Returns:  |  path to use use for log file directory

` on_ros_path ` (  _p_ [  , _env=None_ ]  )  → bool  Â¶


  Console Output Formatting
rosconsole allows you to specify how you'd like its output to show up in the
console output through the ` ROSCONSOLE_FORMAT ` environment variable. The
default is equivalent to:

    export ROSCONSOLE_FORMAT='[${severity}] [${time}]: ${message}'
See [ http://ros.org/doc/api/rosconsole/html/index.html
](http://ros.org/doc/api/rosconsole/html/index.html) for more information on
this package in general. You can see the list of parsed format strings [ in
the source code
](http://docs.ros.org/api/rosconsole/html/namespaceros_1_1console.html


These two problems are independent issues. Would you like me to create an
issue for the 2nd one? The title of this ticket only applies to the 1st one.


[ Sign up
](/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-
name%3E%2F%3Crepo-
name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-
repo&source_repo=ms-iot%2Fvscode-ros)


` rospkg.environment. ` ` ROS_TEST_RESULTS_DIR ` Â¶


Thank you for the report.


[ Log in ](/accounts/login/?next=/layerindex/recipe/390135/)


**[ Ryanf55 ](/Ryanf55) ** commented  Jan 15, 2024  •


` ROS_TEST_RESULTS_DIR ` ¶


    * [ Enterprise ](/enterprise)
    * [ Teams ](/team)
    * [ Startups ](/enterprise/startups)
    * [ Education  ](https://education.github.com)


* [ Show Source ](_sources/environment.txt)


  * Windows: (Version)
  * Linux: (Dist/Version) Ubuntu 22.04 for development server, Windows 10 for host OS, connected using vscode ssh extension
  * ROS 1: Dist
  * ROS 2: ROS 2 humble


Get directory to use for writing log files. There are multiple possible
locations for this. The  ` ROS_LOG_DIR  ` environment variable has priority.
If that is not set, then  ` ROS_HOME  ` /log is used. If  ` ROS_HOME  ` is not
set, ` $HOME/.ros/log  ` is used.


####  Next topic


  ROS_IP/ROS_HOSTNAME
` ROS_IP ` and ` ROS_HOSTNAME ` are optional environment variable that sets

the declared network address of a ROS [ Node ](/Node) or tool. The options are
mutually exclusive, if both are set ` ROS_HOSTNAME ` will take precedence. Use
` ROS_IP ` if you are specifying an IP address, and ` ROS_HOSTNAME ` if you
are specifying a host name. When a ROS component reports a URI to the master
or other components, this value will be used. This setting is only needed in
situations where you have multiple addresses for a computer and need to force
ROS to a particular one.
With the exception of 'localhost', it does _not_ affect the actual bound
address as ROS components bind to all available network interfaces. If the
value is set to localhost, the ROS component will bind only to the loopback
interface. This will prevent remote components from being able to talk to your
local component.


  Required ROS Environment Variables
Most systems will also have ` ROS_PACKAGE_PATH ` set, but the only required
environment variables for ROS are ` ROS_ROOT ` , ` ROS_MASTER_URI ` , and `
PYTHONPATH ` . By default these are automatically set for you by sourcing
/opt/ros/ROSDISTRO/setup.bash. (Replace ROSDISTRO with the desired ROS
distribution, e.g. indigo.)


[ ![@Ryanf55](https://avatars.githubusercontent.com/u/25047695?s=80&v=4)
](/Ryanf55)


The VSCode ROS extension Provides a "ROS Create Terminal" Command which
creates a new terminal with ROS sourced. VSCode does not give extensions a
hook for providing environment through the normal UI.

---

All reactions


[ Sign in ](/login?return_to=https%3A%2F%2Fgithub.com%2Fms-iot%2Fvscode-
ros%2Fissues%2F1272)


###  Quick search


##  Plug-in system


Best Regards


[ Windows Software for Visualizing CAN and CAN FD Signal Courses ](CAN-FD-
Frame-Analyzer.563.0.html?&L=1)


  python-can  #

The **python-can** library provides Controller Area Network support for [
Python ](http://python.org/download/) , providing common abstractions to
different hardware devices, and a suite of utilities for sending and receiving
messages on a CAN bus.

**python-can** runs any where Python runs; from high powered computers with
commercial  CAN to USB  devices right down to low powered devices running
linux such as a BeagleBone or RaspberryPi.

More concretely, some example uses of the library:

  * Passively logging what occurs on a CAN bus. For example monitoring a commercial vehicle using its [ OBD-II port ](https://en.wikipedia.org/wiki/On-board_diagnostics#OBD-II) .

  * Testing of hardware that interacts via CAN. Modules found in modern cars, motorcycles, boats, and even wheelchairs have had components tested from Python using this library.

  * Prototyping new hardware modules or software algorithms in-the-loop. Easily interact with an existing bus.

  * Creating virtual modules to prototype CAN bus communication.

Brief example of the library in action: connecting to a CAN bus, creating and
sending a message:

     1#!/usr/bin/env python
     2
     3"""
     4This example shows how sending a single message works.
     5"""
     6
     7import can
     8
     9
    10def send_one():
    11    """Sends a single message."""
    12
    13    # this uses the default configuration (for example from the config file)
    14    # see https://python-can.readthedocs.io/en/stable/configuration.html


  * [ Code  ](/belovictor/odrive_can_ros_driver)
  * [ Issues  ](/belovictor/odrive_can_ros_driver/issues)
  * [ Pull requests  ](/belovictor/odrive_can_ros_driver/pulls)
  * [ Actions  ](/belovictor/odrive_can_ros_driver/actions)
  * [ Projects  ](/belovictor/odrive_can_ros_driver/projects)
  * [ Security  ](/belovictor/odrive_can_ros_driver/security)
  * [ Insights  ](/belovictor/odrive_can_ros_driver/pulse)


#  Package Summary


###  Initialize NIC


[ API Implementation of the Universal Measurement and Calibration Protocol
](PCAN-XCP-API.445.0.html?&L=1)


Name  |  Name  |


USB-to-CAN V2 compact


	// be INTRuptible by user
	setup_sig_handler(SIGINT, signal_handler);


[ ![](typo3temp/pics/eb3fdbbdee.jpg) ](Thermocouple-
Configuration.550.0.html?&L=1)


####  [ PCAN-Basic ](PCAN-Basic.239.0.html?&L=1)


Here i ran the pcaneventread.cpp example, the error is due to not recognizing the pcan device (the code is trying to open PCAN_PCIBUS1 instead of PCAN_USBBUS1 due to the definitions at the beginnig?)
Screenshot from 2021-12-14 15-03-46.png
Screenshot from 2021-12-14 15-03-46.png (9.17 KiB) Viewed 2728 times
To which I harcoded PCAN_USBBUS1 as the pcan_device
Screenshot from 2021-12-14 15-27-59.png
Screenshot from 2021-12-14 15-27-59.png (92.75 KiB) Viewed 2728 times
Screenshot from 2021-12-14 15-13-15.png
Screenshot from 2021-12-14 15-13-15.png (20.61 KiB) Viewed 2728 times
As shown in the outputs (both are the same code but ran with different commands), the connection is made and I manage to use Get_Value without getting error. But as soon as the CAN_Read is executed, the code crashes (also happens in the case of CAN_Write for the respective example).


  * Build history (last 5 of 12 builds):
  * [ #19  22-Nov-2022 08:08  82 / 82  ](https://build.ros.org//job/Ndev__ros_canopen__ubuntu_focal_amd64/19/)
  * [ #18  14-Nov-2022 10:08  82 / 82  ](https://build.ros.org//job/Ndev__ros_canopen__ubuntu_focal_amd64/18/)
  * [ #17  11-Nov-2021 22:08  82 / 82  ](https://build.ros.org//job/Ndev__ros_canopen__ubuntu_focal_amd64/17/)
  * [ #16  09-Jul-2021 16:08  82 / 82  ](https://build.ros.org//job/Ndev__ros_canopen__ubuntu_focal_amd64/16/)
  * [ #15  07-May-2021 00:10  82 / 82  ](https://build.ros.org//job/Ndev__ros_canopen__ubuntu_focal_amd64/15/)


ROS driver for the ODrive motor controller connecting through CAN bus


    * [ Learning Pathways  ](https://resources.github.com/learn/pathways/)
    * [ White papers, Ebooks, Webinars  ](https://resources.github.com/)
    * [ Customer Stories ](/customer-stories)
    * [ Partners  ](https://partner.github.com/)


[ ![](typo3temp/pics/6a9fa5e964.jpg) ](MacCAN.336.0.html?&L=1)


[ API for Developing Applications with LIN Connection ](PLIN-
API.444.0.html?&L=1)


[ ![](typo3temp/pics/05c484b8d2.jpg) ](QNX-driver.261.0.html?&L=1)


		if (Status == PCAN_ERROR_QRCVEMPTY) {
			printf("CAN_Read(%xh) Abnormal PCAN_ERROR_QRCVEMPTY status. Wating 1s before looping (^C to stop)...\n", pcan_device);


  * **[ Code API ](http://docs.ros.org/jade/api/socketcan_interface/html) **
  * [ FAQ ](http://answers.ros.org/questions/scope:all/sort:activity-desc/tags:socketcan_interface/page:1/)
  * [ Changelog ](http://docs.ros.org/en/jade/changelogs/socketcan_interface/changelog.html)
  * [ Change List ](/ros_canopen/ChangeList)
  * [ Reviews ](/socketcan_interface/Reviews)


int main(int argc, char* argv[])
{
	ros::init(argc, argv, "can_write");
	ros::NodeHandle n;
	TPCANStatus Status;
	TPCANTimestamp ts;
	unsigned int rx_count = 0;
	unsigned int pcan_device = PCAN_USBBUS1;


[ ![](typo3temp/pics/9a76b6fe26.jpg) ](PCAN-OBD-2-API.371.0.html?&L=1)


Offers only for industry and trade. All prices are stated net of VAT. PEAK-
System Technik GmbH is certified to ISO 9001 and ISO 14001.

© 2024 PEAK-System Technik GmbH · Germany · Last modified: 2023-10-23


Set-up udev rules or type manually:


[ ![](typo3temp/pics/7e86810ad5.jpg) ](PEAK-System-
Information.557.0.html?&L=1)


Except where otherwise noted, the ROS wiki is licensed under the
[ Creative Commons Attribution 3.0
](http://creativecommons.org/licenses/by/3.0/)


The SocketCAN driver is exposed as "can::SocketCANInterface" with base class
can::DriverInterface via [ class_loader ](/class_loader) . In addition the
plugin library is announced to [ pluginlib ](/pluginlib) .


	Status = CAN_Initialize(pcan_device, PCAN_BAUD_500K, 0, 0, 0);
	printf("CAN_Initialize(%xh): Status=0x%x\n", pcan_device, (int)Status);
	if (Status)
		goto lbl_exit;


Ok I will take a look at it.


		TPCANMsg Message;
		Status = CAN_Read(pcan_device, &Message, &ts);


Hello, I'm working with a Peak USB driver. I have managed to connect to my driver and initialize it without errors (I have also tested opening the can port through a separate terminal and tried to connect with the script at the same time, which throws an error due to the channel being busy, as expected). I am able to establish the connection through CAN_Initialize, also can use CAN_GetValue, and other functions within the library. But any time I try to run CAN_READ or CAN_Write the driver crashes.


####  [ PCAN-MicroMod FD Configuration ](PCAN-MicroMod-FD-
Configuration.513.0.html?&L=1)


  * [ source debian buster ](https://build.ros.org/view/Nsrc_dB/job/Nsrc_dB__socketcan_interface__debian_buster__source)
  * [ source ubuntu focal ](https://build.ros.org/view/Nsrc_uF/job/Nsrc_uF__socketcan_interface__ubuntu_focal__source)
  * [ binary debian buster amd64 ](https://build.ros.org/view/Nbin_db_dB64/job/Nbin_db_dB64__socketcan_interface__debian_buster_amd64__binary)
  * [ binary debian buster arm64 ](https://build.ros.org/view/Nbin_dbv8_dBv8/job/Nbin_dbv8_dBv8__socketcan_interface__debian_buster_arm64__binary)
  * [ binary ubuntu focal amd64 ](https://build.ros.org/view/Nbin_uF64/job/Nbin_uF64__socketcan_interface__ubuntu_focal_amd64__binary)
  * [ binary ubuntu focal armhf ](https://build.ros.org/view/Nbin_ufhf_uFhf/job/Nbin_ufhf_uFhf__socketcan_interface__ubuntu_focal_armhf__binary)
  * [ binary ubuntu focal arm64 ](https://build.ros.org/view/Nbin_ufv8_uFv8/job/Nbin_ufv8_uFv8__socketcan_interface__ubuntu_focal_arm64__binary)
  * [ devel debian buster amd64 ](https://build.ros.org/view/Ndev_db/job/Ndev_db__ros_canopen__debian_buster_amd64)
  * [ devel ubuntu focal amd64 ](https://build.ros.org/view/Ndev/job/Ndev__ros_canopen__ubuntu_focal_amd64)
  * [ doc ](https://build.ros.org/view/Ndoc/job/Ndoc__ros_canopen__ubuntu_focal_amd64)


Name


###  can-utils


_**[ ros_canopen ](/ros_canopen?distro=jade) ** : [ can_msgs
](/can_msgs?distro=jade) | [ canopen_402 ](/canopen_402?distro=jade) | [
canopen_chain_node ](/canopen_chain_node?distro=jade) | [ canopen_master
](/canopen_master?distro=jade) | [ canopen_motor_node
](/canopen_motor_node?distro=jade) | [ socketcan_bridge
](/socketcan_bridge?distro=jade) | socketcan_interface _


[ ![](typo3temp/pics/c602506a20.jpg) ](CANopen-Magic.258.0.html?&L=1)


int main(int argc, char* argv[])
{
	ros::init(argc, argv, "can_write");
   	ros::NodeHandle n;
	TPCANStatus Status;
	TPCANTimestamp ts;
	unsigned int rx_count = 0;
	unsigned int pcan_device = PCAN_USBBUS1;


However i found multiple ROS examples in which the timestamp of
a message object is passed as null (this was a repeating pattern with any example
i was able to find on this).


sudo apt-get install can-utils


[ Search syntax tips ](https://docs.github.com/search-github/github-code-
search/understanding-github-code-search-syntax)


  * [ canopen_chain_node ](/canopen_chain_node?distro=lunar)
  * [ canopen_master ](/canopen_master?distro=lunar)
  * [ ros_canopen ](/ros_canopen?distro=lunar)
  * [ socketcan_bridge ](/socketcan_bridge?distro=lunar)


###  Forks


[ LabVIEW Drivers for PCAN-Basic, PCAN-Developer, and PLIN-API ](LabVIEW-CAN-
LIN-Drivers.255.0.html?&L=1)


printf("Entering infinite loop (reading MSG[ID:0xff LEN:1 DATA[0]:0xff] breaks it)...\n");


####  [ PCAN-Explorer 6 ](PCAN-Explorer-6.415.0.html?&L=1)


[ ![](typo3temp/pics/5d593b8164.jpg) ](PE6-Instruments-Panel-Add-
in-6.418.0.html?&L=1)


Driver is configured with the following configuration paramters:


You signed in with another tab or window. [ Reload ]() to refresh your
session.  You signed out in another tab or window. [ Reload ]() to refresh
your session.  You switched accounts on another tab or window. [ Reload ]() to
refresh your session.  Dismiss alert


* _DriverInterface_ : inherits from both and adds management interfaces


  * **[ Code API ](http://docs.ros.org/en/noetic/api/socketcan_interface/html) **
  * [ FAQ ](http://answers.ros.org/questions/scope:all/sort:activity-desc/tags:socketcan_interface/page:1/)
  * [ Changelog ](http://docs.ros.org/en/noetic/changelogs/socketcan_interface/changelog.html)
  * [ Change List ](/ros_canopen/ChangeList)
  * [ Reviews ](/socketcan_interface/Reviews)


[ Calibration of electronic control units with CAN interfaces from PEAK-System
](CAN-Bus-Connection-for-Sumac.542.0.html?&L=1)


  1. Overview
  2. Plug-in system
  3. Tested Drivers and Devices
  4. Preparation
    1. Load driver
    2. Initialize NIC
  5. Tools and Debugging
    1. socketcan_dump
    2. Netlink status
    3. can-utils


** Dependencies  (2) **


  * [ source ubuntu bionic ](https://build.ros.org/view/Msrc_uB/job/Msrc_uB__socketcan_interface__ubuntu_bionic__source)
  * [ binary ubuntu bionic amd64 ](https://build.ros.org/view/Mbin_uB64/job/Mbin_uB64__socketcan_interface__ubuntu_bionic_amd64__binary)
  * [ binary ubuntu bionic armhf ](https://build.ros.org/view/Mbin_ubhf_uBhf/job/Mbin_ubhf_uBhf__socketcan_interface__ubuntu_bionic_armhf__binary)
  * [ binary ubuntu bionic arm64 ](https://build.ros.org/view/Mbin_ubv8_uBv8/job/Mbin_ubv8_uBv8__socketcan_interface__ubuntu_bionic_arm64__binary)
  * [ devel ubuntu bionic amd64 ](https://build.ros.org/view/Mdev/job/Mdev__ros_canopen__ubuntu_bionic_amd64)
  * [ doc ](https://build.ros.org/view/Mdoc/job/Mdoc__ros_canopen__ubuntu_bionic_amd64)


        * [ PCAN-OBD-2 API ](PCAN-OBD-2-API.374.0.html?&L=1)
        * [ PLIN-API, Manager & Status Display ](PLIN-API-Manager-Status-Display.142.0.html?&L=1)
      * [ Software ](Software.188.0.html?&L=1)
        * [ PCAN-View ](PCAN-View.144.0.html?&L=1)
        * [ PLIN-View Pro ](PLIN-View-Pro.279.0.html?&L=1)
        * [ PCAN-Trace ](PCAN-Trace.407.0.html?&L=1)
        * [ PCAN-FMS Simulator 1 ](PCAN-FMS-Simulator-1.454.0.html?&L=1)
        * [ PCAN-FMS Simulator 2 ](PCAN-FMS-Simulator-2.276.0.html?&L=1)
        * [ PCAN-Symbol Editor 3 ](PCAN-Symbol-Editor-3.278.0.html?&L=1)
        * [ PCAN-Symbol Editor 6 ](PCAN-Symbol-Editor-6.428.0.html?&L=1)
        * [ PPCAN-Editor 2 ](PPCAN-Editor-2.280.0.html?&L=1)
        * [ PCAN-MicroMod FD Configuration ](PCAN-MicroMod-FD-Configuration.505.0.html?&L=1)
        * [ PCAN-MicroMod Configuration ](PCAN-MicroMod-Configuration.411.0.html?&L=1)
        * [ PCAN-LIN Configuration ](PCAN-LIN-Configuration.140.0.html?&L=1)
        * [ Thermocouple Configuration ](Thermocouple-Configuration.383.0.html?&L=1)
        * [ Thermocouple FD Configuration ](Thermocouple-FD-Configuration.545.0.html?&L=1)
        * [ PCAN-Diag Editor ](PCAN-Diag-Editor.186.0.html?&L=1)
        * [ PCAN-Diag FD Editor ](PCAN-Diag-FD-Editor.463.0.html?&L=1)
        * [ Virtual PCAN-Gateway ](Virtual-PCAN-Gateway.397.0.html?&L=1)
        * [ PCAN Nets Configuration ](PCAN-Nets-Configuration.429.0.html?&L=1)
        * [ PCAN Status Display ](PCAN-Status-Display.430.0.html?&L=1)
        * [ PLIN Status Display ](PLIN-Status-Display.453.0.html?&L=1)
        * [ Device Driver Setup ](Device-Driver-Setup.539.0.html?&L=1)
        * [ PEAK-Settings ](PEAK-Settings.571.0.html?&L=1)
        * [ PEAK Hardware Control Applet ](PEAK-Hardware-Control-Applet.412.0.html?&L=1)
        * [ PEAK System Information ](PEAK-System-Information.410.0.html?&L=1)
        * [ Bit Rate Calculation Tool - Windows ](Bit-Rate-Calculation-Tool-Windows.498.0.html?&L=1)
        * [ Bit Rate Calculation Tool - App ](Bit-Rate-Calculation-Tool-App.516.0.html?&L=1)
        * [ CAN FD Frame Analyzer ](CAN-FD-Frame-Analyzer.536.0.html?&L=1)
        * [ PEAK-Flash ](PEAK-Flash.510.0.html?&L=1)
        * [ PCAN-Flash ](PCAN-Flash.409.0.html?&L=1)
        * [ PEAK-Converter ](PEAK-Converter.191.0.html?&L=1)
        * [ PEAK-Trace Splitter ](PEAK-Trace-Splitter.531.0.html?&L=1)
        * [ PCAN-OBD-2 Viewer ](PCAN-OBD-2-Viewer.537.0.html?&L=1)
        * [ Plot Viewer ](Plot-Viewer.431.0.html?&L=1)
        * [ COTI DLL Version History ](COTI-DLL-Version-History.343.0.html?&L=1)
      * [ PCAN-Explorer 6 ](PCAN-Explorer-6.421.0.html?&L=1)
        * [ Version 6.7.0 ](Version-6-7-0.585.0.html?&L=1)
        * [ Version 6.6.2 ](Version-6-6-2.583.0.html?&L=1)
        * [ Version 6.6.1 ](Version-6-6-1.576.0.html?&L=1)


	Status = CAN_Initialize(pcan_device, PCAN_BAUD_500K, 0, 0, 0);
	printf("CAN_Initialize(%xh): Status=0x%x\n", pcan_device, (int)Status);
	if (Status)
		goto lbl_exit;


Marvin
Top
angux
Posts: 5
Joined: Tue 14. Dec 2021, 14:34
Re: Crash on Read/Write PCANBasic
Post by angux » Thu 16. Dec 2021, 14:51


Released


Readme


###  Dependancies


[ Professional CAN and CAN FD Development Package for Windows® ](PCAN-
Developer-4.461.0.html?&L=1)


##  Tools and Debugging


[ ![](typo3temp/pics/78762ec8a0.jpg) ](PCAN-XCP-API.445.0.html?&L=1)


  * Maintainer status: maintained
  * Maintainer: Mathias Lüdtke <mathias.luedtke AT ipa.fraunhofer DOT de>
  * Author: Mathias Lüdtke <mathias.luedtke AT ipa.fraunhofer DOT de>
  * License: LGPLv3
  * Bug / feature tracker: [ https://github.com/ros-industrial/ros_canopen/issues ](https://github.com/ros-industrial/ros_canopen/issues)
  * Source: git [ https://github.com/ros-industrial/ros_canopen.git ](https://github.com/ros-industrial/ros_canopen) (branch: melodic)


[ ![](typo3temp/pics/2c0c440d2b.jpg) ](PE6-J1939-Add-in-6.420.0.html?&L=1)


  * [ canopen_chain_node ](/canopen_chain_node?distro=noetic)
  * [ canopen_master ](/canopen_master?distro=noetic)
  * [ cob_bms_driver ](/cob_bms_driver?distro=noetic)
  * [ cob_elmo_homing ](/cob_elmo_homing?distro=noetic)
  * [ cob_generic_can ](/cob_generic_can?distro=noetic)
  * [ ros_canopen ](/ros_canopen?distro=noetic)
  * [ socketcan_bridge ](/socketcan_bridge?distro=noetic)


####  [ PCAN-FMS Simulator 2 ](PCAN-FMS-Simulator-2.246.0.html?&L=1)


		rx_count++;
		printf("  - R ID:%4x LEN:%1x DATA:%02x %02x %02x %02x %02x %02x %02x %02x TS:%010d.%d\n",
				(int) Message.ID, (int) Message.LEN, (int) Message.DATA[0],
				(int) Message.DATA[1], (int) Message.DATA[2],
				(int) Message.DATA[3], (int) Message.DATA[4],
				(int) Message.DATA[5], (int) Message.DATA[6],
				(int) Message.DATA[7], ts.millis, ts.micros);
Again, I can't find the reason why this happens. If anyone can help, thanks in advance :D
Top
M.Heidemann
Sales & Support
Sales & Support
Posts: 822
Joined: Fri 20. Sep 2019, 13:31
Re: Crash on Read/Write PCANBasic
Post by M.Heidemann » Wed 15. Dec 2021, 13:05


Hello,


[ Activity  ](/belovictor/odrive_can_ros_driver/activity)


I was unable to assess what's going on here as we are not familiar
with ROS and do not have an instance to test with.


[ Comprehensive Data Logger for CAN Messages ](PCAN-Trace.247.0.html?&L=1)


[ ![](typo3temp/pics/635f3a9b4e.jpg) ](PCAN-ISO-TP-API.369.0.html?&L=1)


** Used by  (7) **


Documented


This packages provides a generic CAN interface class and a [ SocketCAN
](http://en.wikipedia.org/wiki/SocketCAN) -based driver implementation.


[ ![](typo3temp/pics/e0ba5ca2f0.jpg) ](PCAN-Developer-4.461.0.html?&L=1)


  * Maintainer status: maintained
  * Maintainer: Mathias Lüdtke <mathias.luedtke AT ipa.fraunhofer DOT de>
  * Author: Mathias Lüdtke <mathias.luedtke AT ipa.fraunhofer DOT de>
  * License: LGPLv3
  * Bug / feature tracker: [ https://github.com/ros-industrial/ros_canopen/issues ](https://github.com/ros-industrial/ros_canopen/issues)
  * Source: git [ https://github.com/ros-industrial/ros_canopen.git ](https://github.com/ros-industrial/ros_canopen) (branch: kinetic)


When driver is started it creates the following topics for every axis
configured:


main


        * [ LIN Device Driver ](LIN-Device-Driver.455.0.html?&L=1)
      * [ Firmware Informationen ](Firmware-Informationen.180.0.html?&L=1)
        * [ PCAN-USB - S/N ≥ 200000 ](PCAN-USB-S-N-200000.472.0.html?&L=1)
        * [ PCAN-USB - S/N < 190000 ](PCAN-USB-S-N-190000.477.0.html?&L=1)
        * [ PCAN-USB FD ](PCAN-USB-FD.470.0.html?&L=1)
        * [ PCAN-USB Pro ](PCAN-USB-Pro.577.0.html?&L=1)
        * [ PCAN-USB Pro FD ](PCAN-USB-Pro-FD.469.0.html?&L=1)
        * [ PCAN-USB X6 ](PCAN-USB-X6.475.0.html?&L=1)
        * [ PLIN-USB ](PLIN-USB.493.0.html?&L=1)
        * [ PEAK CAN FD Interfaces with PCIe ](PEAK-CAN-FD-Interfaces-with-PCIe.572.0.html?&L=1)
        * [ PCAN-Chip USB ](PCAN-Chip-USB.476.0.html?&L=1)
        * [ PCAN-MicroMod ](PCAN-MicroMod.518.0.html?&L=1)
        * [ PCAN-MicroMod CANopen ](PCAN-MicroMod-CANopen.578.0.html?&L=1)
        * [ PCAN-MicroMod FD ](PCAN-MicroMod-FD.519.0.html?&L=1)
        * [ PCAN-MicroMod FD CANopen ](PCAN-MicroMod-FD-CANopen.541.0.html?&L=1)
        * [ PCAN-MIO ](PCAN-MIO.379.0.html?&L=1)
        * [ MU-Thermocouple1 CAN FD ](MU-Thermocouple1-CAN-FD.561.0.html?&L=1)
        * [ PCAN-Gateway Software ](PCAN-Gateway-Software.348.0.html?&L=1)
        * [ PCAN-Gateway FD Software ](PCAN-Gateway-FD-Software.540.0.html?&L=1)
        * [ PCAN-LIN ](PCAN-LIN.386.0.html?&L=1)
        * [ PCAN-Router Pro ](PCAN-Router-Pro.151.0.html?&L=1)
        * [ PCAN-Router Pro FD ](PCAN-Router-Pro-FD.521.0.html?&L=1)
        * [ PCAN-Router Pro FD - Data Logger ](PCAN-Router-Pro-FD-Data-Logger.522.0.html?&L=1)
        * [ PCAN-GPRS Link ](PCAN-GPRS-Link.185.0.html?&L=1)
        * [ PCAN-Diag 2 ](PCAN-Diag-2.146.0.html?&L=1)
        * [ PCAN-Diag FD ](PCAN-Diag-FD.458.0.html?&L=1)
        * [ PCAN-MiniDiag FD ](PCAN-MiniDiag-FD.497.0.html?&L=1)
        * [ PCAN-MiniDisplay ](PCAN-MiniDisplay.448.0.html?&L=1)
        * [ PEAK-DevPack ](PEAK-DevPack.565.0.html?&L=1)
  * [ Forum ](Forum.133.0.html?&L=1)
  * [ Contact ](Contact.54.0.html?&L=1)
    * [ Contact Information ](Contact-Information.86.0.html?&L=1)
    * [ Locations ](Locations.85.0.html?&L=1)
    * [ Distributors ](Distributors.87.0.html?&L=1)


Comments

---|---|---|---|---

[ PEAK-System Technik GmbH ](http://www.peak-system.com/)


Here I also send a log file that could suit better of what you are also looking for:
 roslaunch-rfs-1368.log
(24.88 KiB) Downloaded 78 times
Thanks.
Top
M.Heidemann
Sales & Support
Sales & Support
Posts: 822
Joined: Fri 20. Sep 2019, 13:31
Re: Crash on Read/Write PCANBasic
Post by M.Heidemann » Thu 16. Dec 2021, 14:18


This commit does not belong to any branch on this repository, and may belong
to a fork outside of the repository.


####  [ PE6: Plotter Add-in 6 ](PE6-Plotter-Add-in-6.417.0.html?&L=1)


Hello,


These cookies are necessary for basic functionality. This allows you to
register on our website and forum or order products with our online shop.


** Dependencies  (2) **


[ launch ](/belovictor/odrive_can_ros_driver/tree/main/launch "launch")


To discard possible doubts, I re ran the code with a print after the CAN_Read to show that effectively there is where the program crashes.
CODE: SELECT ALL


* [ The ReadME Project  GitHub community articles  ](/readme)


  * Immutable Page
  * Comments
  * [ Info ](/action/info/socketcan_interface?action=info)
  * [ Attachments ](/action/AttachFile/socketcan_interface?action=AttachFile)
  * More Actions:  Raw Text  Print View  Render as Docbook  Delete Cache  \------------------------  Check Spelling  Like Pages  Local Site Map  \------------------------  Rename Page  Copy Page  Delete Page  \------------------------  My Pages  Subscribe User  \------------------------  Remove Spam  Revert to this revision  Package Pages  Sync Pages  \------------------------  CreatePdfDocument  Load  RawFile  Save  SlideShow


####  [ PLIN-API ](PLIN-API.444.0.html?&L=1)


[ CANopen® Analysis, Development, and Simulation Software ](CANopen-
Magic.258.0.html?&L=1)


####  [ PLIN-View Pro ](PLIN-View-Pro.243.0.html?&L=1)


  * [ canopen_chain_node ](/canopen_chain_node?distro=indigo)
  * [ canopen_master ](/canopen_master?distro=indigo)
  * [ cob_bms_driver ](/cob_bms_driver?distro=indigo)
  * [ cob_generic_can ](/cob_generic_can?distro=indigo)
  * [ ros_canopen ](/ros_canopen?distro=indigo)
  * [ socketcan_bridge ](/socketcan_bridge?distro=indigo)


Works


* **noetic:** _Documentation generated on March 02, 2022 at 08:49 AM_ ( [ doc job ](https://build.ros.org/view/Ndoc/job/Ndoc__ros_canopen__ubuntu_focal_amd64) ).


[ GLIWA Connection for PEAK-System Development Packages ](CAN-Bus-Connection-
for-T1-from-GLIW.567.0.html?&L=1)


Vendor


Versions

     [ stable ](/en/stable/)
     [ v4.3.1 ](/en/v4.3.1/)
     [ v4.3.0 ](/en/v4.3.0/)
     [ v4.2.2 ](/en/v4.2.2/)
     [ v4.2.1 ](/en/v4.2.1/)
     [ v4.2.0 ](/en/v4.2.0/)
     [ v4.1.0 ](/en/v4.1.0/)
     [ 4.0.0 ](/en/4.0.0/)
     [ 3.3.4 ](/en/3.3.4/)
     [ 3.3.3 ](/en/3.3.3/)
     [ 3.3.2 ](/en/3.3.2/)
     [ 3.3.1 ](/en/3.3.1/)
     [ 3.2.1 ](/en/3.2.1/)
     [ 3.1.1 ](/en/3.1.1/)
     [ 3.0.0 ](/en/3.0.0/)
     [ 2.2.1 ](/en/2.2.1/)
     [ 2.2.0 ](/en/2.2.0/)
     [ 2.1.0 ](/en/2.1.0/)
     [ 2.0.0 ](/en/2.0.0/)
     [ 1.5.2 ](/en/1.5.2/)
     [ main ](/en/main/)

Downloads

     [ pdf ](//python-can.readthedocs.io/_/downloads/en/stable/pdf/)
     [ epub ](//python-can.readthedocs.io/_/downloads/en/stable/epub/)

On Read the Docs

     [ Project Home ](//readthedocs.org/projects/python-can/?fromdocs=python-can)
     [ Builds ](//readthedocs.org/builds/python-can/?fromdocs=python-can)

Back to top

[ Edit this page  ](https://github.com/hardbyte/python-
can/edit/f0634d2445f74f8c5c3b90236975f73fe3d8ba2a/doc/index.rst "Edit this
page")


Continuous Integration:  82 / 82


* _CommInterface_ : Listener interface for receiving messages and send functionality


###  Topics


[ Optional Function Upgrade for the PCAN-Explorer ](PE6-Plotter-Add-
in-6.417.0.html?&L=1)


[ Professional Windows® Software to Communicate with CAN and CAN FD Buses
](PCAN-Explorer-6.415.0.html?&L=1)


Released


Maybe this is helpful to you.


* [ Login ](/action/login/socketcan_interface?action=login)


[ QNX Driver for CAN Interfaces by PEAK-System ](QNX-driver.261.0.html?&L=1)


####  [ PCAN-PassThru API ](PCAN-PassThru-API.405.0.html?&L=1)


ip -details -statistics link show can0


Kernel esd_usb2


Code


[ ![](typo3temp/pics/6180146cc3.jpg) ](MathWorks.376.0.html?&L=1)


[ ![](typo3temp/pics/1f00d931ef.jpg) ](CANopen-PC-Developer-
Kit.259.0.html?&L=1)


rosrun socketcan_interface socketcan_dump can0


  * [ Product Overview ](Product-Overview.333.0.html?&L=1)
  * [ Hardware ](Hardware.69.0.html?&L=1)
    * [ PC Interfaces ](PC-Interfaces.196.0.html?&L=1)
      * [ PCAN-USB ](PCAN-USB.199.0.html?&L=1)
      * [ PCAN-USB FD ](PCAN-USB-FD.365.0.html?&L=1)
      * [ PCAN-USB Pro FD ](PCAN-USB-Pro-FD.366.0.html?&L=1)
      * [ PCAN-USB X6 ](PCAN-USB-X6.438.0.html?&L=1)
      * [ PLIN-USB ](PLIN-USB.485.0.html?&L=1)
      * [ PCAN-PCI ](PCAN-PCI.207.0.html?&L=1)
      * [ PCAN-PCI Express ](PCAN-PCI-Express.206.0.html?&L=1)
      * [ PCAN-PCI Express FD ](PCAN-PCI-Express-FD.414.0.html?&L=1)
      * [ PCAN-miniPCI ](PCAN-miniPCI.205.0.html?&L=1)
      * [ PCAN-miniPCIe ](PCAN-miniPCIe.285.0.html?&L=1)
      * [ PCAN-miniPCIe FD ](PCAN-miniPCIe-FD.464.0.html?&L=1)
      * [ PCAN-M.2 ](PCAN-M-2.473.0.html?&L=1)
      * [ PCAN-PC/104 ](PCAN-PC-104.210.0.html?&L=1)
      * [ PCAN-PC/104-Plus ](PCAN-PC-104-Plus.209.0.html?&L=1)
      * [ PCAN-PC/104-Plus Quad ](PCAN-PC-104-Plus-Quad.286.0.html?&L=1)
      * [ PCAN-PCI/104-Express ](PCAN-PCI-104-Express.208.0.html?&L=1)
      * [ PCAN-PCI/104-Express FD ](PCAN-PCI-104-Express-FD.474.0.html?&L=1)
      * [ PCAN-ExpressCard 34 ](PCAN-ExpressCard-34.367.0.html?&L=1)
      * [ PCAN-ExpressCard ](PCAN-ExpressCard.202.0.html?&L=1)
      * [ PCAN-PC Card ](PCAN-PC-Card.203.0.html?&L=1)
      * [ PCAN-ISA ](PCAN-ISA.211.0.html?&L=1)
      * [ PCAN-Dongle ](PCAN-Dongle.212.0.html?&L=1)
    * [ Chip Solutions ](Chip-Solutions.440.0.html?&L=1)
      * [ PCAN-Chip PCIe FD ](PCAN-Chip-PCIe-FD.443.0.html?&L=1)
      * [ PCAN-Chip USB & Eval ](PCAN-Chip-USB-Eval.441.0.html?&L=1)
    * [ Couplers & Converters ](Couplers-Converters.197.0.html?&L=1)
      * [ PCAN-Optoadapter ](PCAN-Optoadapter.215.0.html?&L=1)
      * [ PCAN-Repeater DR ](PCAN-Repeater-DR.216.0.html?&L=1)
      * [ PCAN-LWL ](PCAN-LWL.214.0.html?&L=1)
      * [ PLIN-LWL ](PLIN-LWL.408.0.html?&L=1)
      * [ PCAN-AU5790 ](PCAN-AU5790.217.0.html?&L=1)
      * [ PCAN-TJA1054 ](PCAN-TJA1054.219.0.html?&L=1)
    * [ I/O Modules ](I-O-Modules.318.0.html?&L=1)
      * [ PCAN-MicroMod FD ](PCAN-MicroMod-FD.500.0.html?&L=1)
      * [ PCAN-MicroMod FD Evaluation ](PCAN-MicroMod-FD-Evaluation.501.0.html?&L=1)
      * [ PCAN-MicroMod FD Analog ](PCAN-MicroMod-FD-Analog.508.0.html?&L=1)
      * [ PCAN-MicroMod FD Digital ](PCAN-MicroMod-FD-Digital.509.0.html?&L=1)


git clone https://github.com/belovictor/odrive_can_ros_driver.git