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

Failure in building ROS2 Rolling via source

asked 2021-01-22 06:10:55 -0500

NithishkumarS gravatar image

updated 2021-01-22 08:38:58 -0500

gvdhoorn gravatar image

When the colcon starts building tf2 the following error pops up. How does one fix this issue and continue build via source?

 /home/nithish/ros2_rolling/install/geometry_msgs/include/geometry_msgs/msg/detail/vector3__traits.hpp:28:5: error: ‘value_to_yaml’ was not declared in this scope
   28 |     value_to_yaml(msg.x, out);
      |     ^~~~~~~~~~~~~
/home/nithish/ros2_rolling/install/geometry_msgs/include/geometry_msgs/msg/detail/vector3__traits.hpp:38:5: error: ‘value_to_yaml’ was not declared in this scope
   38 |     value_to_yaml(msg.y, out);
      |     ^~~~~~~~~~~~~
edit retag flag offensive close merge delete

Comments

In order to best help, we would need to know what steps you took to reach this result and what instructions you were following. Also of potential use would be the output of vcs export --exact src from your workspace to see which exact versions of ROS packages you are trying to build.

nuclearsandwich gravatar image nuclearsandwich  ( 2021-01-22 15:26:45 -0500 )edit

I can't promise this is your specific issue, but I've had that issue before when I tried building in a dirty terminal that had already sourced Foxy binaries. When I nuked that workspace's build/log/install and opened a fresh terminal I got it to work again.

stevemacenski gravatar image stevemacenski  ( 2021-01-22 16:07:53 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2021-04-07 03:41:46 -0500

m2-farzan gravatar image

If you have already installed a previous version of ROS (like foxy), that might be the source of the problem. It's because value_to_yaml function is introduced recently, and the compiler may prioritize the older version of ROS, resulting the 'not declared' error. To solve this, I just had to comment out source /opt/ros/foxy/setup.bash from my ~/.bashrc file and restart the terminal. Hope this helps.

edit flag offensive delete link more

Comments

Thanks a lot, you save my life. And btw, please make sure delete the previous build cache before colcon build again

zzsqwq gravatar image zzsqwq  ( 2022-12-16 02:03:29 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2021-01-22 06:10:55 -0500

Seen: 663 times

Last updated: Jan 22 '21