ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I am not sure if I understand you question. You say you need to declare environment variables before calling catkin
. Doesn't that catkin itself can't help you with that?
If you want to set environment variable in one package to be available to other downstream packages that can be done by environment hook in catkin. For an example how to use environment hooks in a package please see the following links: https://github.com/ros/ros/blob/6e4374fa4bbaea32f7e0311f93fa793b52f19917/core/roslib/CMakeLists.txt#L28 https://github.com/ros/ros/blob/jade-devel/core/roslib/env-hooks/10.ros.sh.em
Maybe you can describe your use case in more detail to enable others to understand it and then give a better answer.
2 | No.2 Revision |
I am not sure if I understand you question. You say you need to declare environment variables before calling catkin
. Doesn't imply that catkin itself can't help you with that?
If you want to set environment variable in one package to be available to other downstream packages that can be done by environment hook in catkin. For an example how to use environment hooks in a package please see the following links: https://github.com/ros/ros/blob/6e4374fa4bbaea32f7e0311f93fa793b52f19917/core/roslib/CMakeLists.txt#L28 https://github.com/ros/ros/blob/jade-devel/core/roslib/env-hooks/10.ros.sh.em
Maybe you can describe your use case in more detail to enable others to understand it and then give a better answer.
3 | No.3 Revision |
I am not sure if I understand you question. You say you need to declare environment variables before calling catkin
. Doesn't that imply that catkin itself can't help you with that?
If you want to set environment variable in one package to be available to other downstream packages that can be done by environment hook in catkin. For an example how to use environment hooks in a package please see the following links: https://github.com/ros/ros/blob/6e4374fa4bbaea32f7e0311f93fa793b52f19917/core/roslib/CMakeLists.txt#L28 https://github.com/ros/ros/blob/jade-devel/core/roslib/env-hooks/10.ros.sh.em
Maybe you can describe your use case in more detail to enable others to understand it and then give a better answer.
4 | No.4 Revision |
I am not sure if I understand you question. You say you need to declare environment variables before calling catkin
. Doesn't that imply that catkin itself can't help you with that?
Or do you want to set the environment variable for some command within CMake?
If you want to set environment variable in one package to be available to other downstream packages that can be done by environment hook in catkin. For an example how to use environment hooks in a package please see the following links: https://github.com/ros/ros/blob/6e4374fa4bbaea32f7e0311f93fa793b52f19917/core/roslib/CMakeLists.txt#L28 https://github.com/ros/ros/blob/jade-devel/core/roslib/env-hooks/10.ros.sh.em
Maybe you can describe your use case in more detail to enable others to understand it and then give a better answer.