Changing TransformListener's transform
Hi,
So I'm trying to change the transform that I'm getting from a transform listener, but it doesn't seem to change.
When trying to set the values, they don't change. Here I'm declaring a const variable, since getRotation.getX returns a const:
const double scalarX = transform.getRotation().getX() + 0.1;
transform.getRotation().setX(scalarX);
Transform is acting like it's const, but it's not and so isn't getRotation, but I still can't change the values.
tf::StampedTransform transform;
listener.lookupTransform(*camera_depth, *base_link, ros::Time(0), transform);
cout << "Before added scalar: " << transform.getRotation().getX() << endl;
const double scalarX = transform.getRotation().getX() + 0.1;
transform.getRotation().setX(scalarX);
cout << "After added scalar: " << transform.getRotation().getX() << endl;