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

Revision history [back]

click to hide/show revision 1
initial version

I had the same compilation errors with rgbdslam under ubuntu 10.10 ros-electric.

I had to change a few lines in the source code to get it working (really, just going after the compiler errors and changing each expression to something equivalent).

On line 1043 the compiler is complanining that the argument passed to the function is a constant (cannot be changed). However, the function expects a mutable variable. To solve it in an easy way, copy the contents of the const float* to a new variable that is declared as float* and pass that to the function instead. The hard but more correct way would be to change the function to accept a pointer to constant floats instead.

click to hide/show revision 2
added "patch" (total hack by the way)

I had the same compilation errors with rgbdslam under ubuntu 10.10 ros-electric.

I had to change a few lines in the source code to get it working (really, just going after the compiler errors and changing each expression to something equivalent).

On line 1043 the compiler is complanining that the argument passed to the function is a constant (cannot be changed). However, the function expects a mutable variable. To solve it in an easy way, copy the contents of the const float* to a new variable that is declared as float* and pass that to the function instead. The hard but more correct way would be to change the function to accept a pointer to constant floats instead.

For example, replace line 1043 in graph_manager.cpp with the following two lines and try compiling it again. pointcloud_type ncloud=cloud_in; Eigen::Map<eigen::vector3f> p_in (&ncloud.points[i].x, 3, 1);

I don't know how this code could have worked earlier, maybe this is related to new versions of g++ ?

I had the same compilation errors with rgbdslam under ubuntu 10.10 ros-electric.

I had to change a few lines in the source code to get it working (really, just going after the compiler errors and changing each expression to something equivalent).

On line 1043 the compiler is complanining that the argument passed to the function is a constant (cannot be changed). However, the function expects a mutable variable. To solve it in an easy way, copy the contents of the const float* to a new variable that is declared as float* and pass that to the function instead. The hard but more correct way would be to change the function to accept a pointer to constant floats instead.

For example, replace line 1043 in graph_manager.cpp with the following two lines and try compiling it again. again.

 pointcloud_type ncloud=cloud_in;
     Eigen::Map<eigen::vector3f> Eigen::Map<Eigen::Vector3f> p_in (&ncloud.points[i].x, 3, 1);

1);

I don't know how this code could have worked earlier, maybe this is related to new versions of g++ ?